UnifiedRepresentation::UnifiedRepresentation Class Reference

List of all members.

Public Member Functions

def __init__
def addKeyword
def setAbstract
def setProgram
def setEcut
def setUnitCell
def addSpecies
def addAtomset
def addAtom
def setAtomPosition
def setAtomForce
def addEnergyComponent
def setStressTensor
def addSlaterDeterminant
def setEigenvalues
def setOccupations
def writeUnifiedRepresentation
def addStdin
def addStdout
def setTranslatorMeta
def setEndTime
def setStartTime
def getUuid
def addRelatedRecord

Public Attributes

 disableKeywords
 isUpdate
 pt
 username
 useDefaultKeywords
 fname
 urXml
 urDoc
 olXml
 est_data_dict
 est_data
 energy
 spectrum
 unit_cell
 species
 qm_data
 qm_data_dict
 est_ann
 name
 hostname
 rectype
 keywords
 abstract
 related
 revision
 identifier

Detailed Description

UnifiedRepresentation is the class container for the translator API to the
unified representation XML format. 

The `set' mutator methods initialize the data of the UR XML elements.

The `add' mutator methods create and initialize multiple of the same UR XML
elements.

The `write' method is called after all `set' and `add' calls to output the UR 
XML to string, file, or stdout.

Member Function Documentation

def UnifiedRepresentation::UnifiedRepresentation::__init__ (   self,
  options,
  inputs 
)
Initializes the UnifiedRepresentation class with arguments (options,inputs) 
taken from a UrOptionParser object.
def UnifiedRepresentation::UnifiedRepresentation::addAtom (   self,
  name,
  species 
)
Adds a <atom name="{name}" species="{species}"> element as a child of the last 
<atomset> element.

Returns the minidom element object for <atom>.
def UnifiedRepresentation::UnifiedRepresentation::addAtomset (   self  ) 
Adds a <atomset> container element that is used in subsequent call(s) to

addSpecies
addAtom
setUnitCell
def UnifiedRepresentation::UnifiedRepresentation::addEnergyComponent (   self,
  name,
  value 
)
Adds a new <ecomponent name="{name}">{value}</ecomponent> element as a child
of the <energy> element in the UR XML.

The value must be in units of Hartree.
def UnifiedRepresentation::UnifiedRepresentation::addKeyword (   self,
  value 
)
Adds a <word> child element to <keywords> with the argument value.

<keywords>
	.
	.
	.
	<word>{value}</word>
</keywords>
def UnifiedRepresentation::UnifiedRepresentation::addRelatedRecord (   self,
  uuid 
)
Adds a related record by UUID as a <record> child of the <related> element.
def UnifiedRepresentation::UnifiedRepresentation::addSlaterDeterminant (   self,
  spin,
  kpoint,
  size,
  weight = "1.0" 
)
Adds a <slater_determinant spin="{spin}" kpoint="{kpoint}" size="{size}" weight="{weight}"> element as a child of the <spectrum> element.

The only acceptable values for spin are ["up","dn","nu"].

kpoint is a x, y, z vector of Cartesian coordinates in absolute reciprocal
space.

size is the number of electron bands is equal to the number of occupation
sites per set of eigenvalues.

weight is a floating point number normalized to 1.0
def UnifiedRepresentation::UnifiedRepresentation::addSpecies (   self,
  href,
  mass,
  symbol 
)
Adds a <species href="{href}" mass="{mass}" symbol="{symbol}" /> element with
the attributes initialized from the argument values.

The attribute href is a URL to the pseudopotential reference file if applicable.

Returns the species chemical name corresponding to the symbol.
def UnifiedRepresentation::UnifiedRepresentation::addStdin (   self,
  txt,
  fname = "stdin" 
)
Adds a <stdin fname="{fname}"> element with the string from txt that is the 
entire original input file contents.
def UnifiedRepresentation::UnifiedRepresentation::addStdout (   self,
  txt,
  fname = "stdout" 
)
Adds a <stdout fname="{fname}"> element with the string from txt that is the 
entire original output file contents. 
def UnifiedRepresentation::UnifiedRepresentation::getUuid (   self  ) 
Returns the UUID associated with this UR XML document.
def UnifiedRepresentation::UnifiedRepresentation::setAbstract (   self,
  abstract 
)
Sets the <abstract> element in the UR XML with the string from the abstract
argument.
def UnifiedRepresentation::UnifiedRepresentation::setAtomForce (   self,
  atom,
  fx,
  fy,
  fz 
)
Sets the <force>{fx} {fy} {fz}</force> child element to the <atom> element
passed by the atom argument.

The values fx, fy, and fz must be in units of Hartree/Bohr.
def UnifiedRepresentation::UnifiedRepresentation::setAtomPosition (   self,
  atom,
  x,
  y,
  z 
)
Sets the <position>{x} {y} {z}</position> child element to the <atom> element
passed by the atom argument.

The values x, y, and z must be in Cartesian coordinates in atomic units (Bohr).
def UnifiedRepresentation::UnifiedRepresentation::setEcut (   self,
  value 
)
Sets the <ecut> element in the UR XML with the argument value. The value must 
be in units of Rydberg.
def UnifiedRepresentation::UnifiedRepresentation::setEigenvalues (   self,
  slaterDeterminant,
  values 
)
Sets the <eigenvalues>{values}</eigenvalues> child element to the
<slater_determinant> element passed by the argument slaterDeterminant.

The values should be a vector of floating point numbers of length size that
is an attribute of the <slater_determinant>. These values must be in units of
electron-volts.
def UnifiedRepresentation::UnifiedRepresentation::setEndTime (   self,
  et 
)
Sets the <end_time>{et}</end_time> element with a date/time tag for the end
of the simulation run.
def UnifiedRepresentation::UnifiedRepresentation::setOccupations (   self,
  slaterDeterminant,
  values 
)
Sets the <occupations>{values}</occupations> child element to the
<slater_determinant> element passed by the argument slaterDeterminant.

The values should be a vector of floating point numbers of length size that
is an attribute of the <slater_determinant>.
def UnifiedRepresentation::UnifiedRepresentation::setProgram (   self,
  name,
  version,
  code 
)
Sets the <program> element in the UR XML and its children elements initialized
from the function arguments

<program>
	<code>{code}</code>
	<name>{name}</name>
	<version>{version}</version>
</program>
def UnifiedRepresentation::UnifiedRepresentation::setStartTime (   self,
  st 
)
Sets the <start_time>{st}</start_time> element with a date/time tag for the
beginning of the simulation run.
def UnifiedRepresentation::UnifiedRepresentation::setStressTensor (   self,
  st 
)
Sets the <stress_tensor> element from an array of length 9 that contains either
simple float values or dictionaries of string keys and float values.

The 9 values of the argument array st map to the components 
[xx,xy,xz,yx,yy,yz,zx,zy,zz]. Each of these components creates a <sigma_XX>
element respectively.

In the case that the array contains dictionaries of string:float pairs instead
of a simple floating point value, the dictionary is accessed to create
children elements of the <sigma_XX> elements that are named for the coodinate
component and have an attribute set from the dictionary keys.

<sigma_XX_component name="{key}">{dict[key]}</sigma_XX_component> 
def UnifiedRepresentation::UnifiedRepresentation::setTranslatorMeta (   self,
  meta 
)
Sets the <translator_meta>{str}</end_time> element with a string to transmit
simple information between translation processes.
def UnifiedRepresentation::UnifiedRepresentation::setUnitCell (   self,
  a,
  b,
  c 
)
Sets the attributes of the <unit_cell a="{a}" b="{b}" c="{c}" /> element. The
arguments a,b,c are the vectors of the unit cell in Cartesian coordinates and
must in atomic units (Bohr).
def UnifiedRepresentation::UnifiedRepresentation::writeUnifiedRepresentation (   self,
  strio = None 
)
Writes the complete UR XML document and outputs to string, file, or stdout based the value
of the fname data member and the argument strio value.

The documentation for this class was generated from the following file:
 All Classes Functions
Generated on Thu Aug 11 15:30:55 2011 for ESTEST UR APIs by  doxygen 1.6.3