Package schrodinger :: Package application :: Package matsci :: Package espresso :: Module qeinput :: Class SpinType
[hide private]
[frames] | no frames]

Class SpinType

 object --+    
          |    
GenericType --+
              |
             SpinType

Class to generate QE input XML section related to spin.

Instance Methods [hide private]
 
__init__(self)
Initialize SpinType object from string.
str
_validateSpin(self, spin)
Validate spin type.
str
_get_tag(self, tag, val)
Generate an XML tag
str
__str__(self)
Return XML.

Inherited from GenericType: updateWithData

Inherited from GenericType (private): _cleanData

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  DEFAULTS = {'spin_type': ''}
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

 

Initialize SpinType object from string.

Parameters:
  • data (dict) - Dictionary of settings
Overrides: object.__init__

_validateSpin(self, spin)

 

Validate spin type.

Parameters:
  • spin (str) - Spin treatment
Returns: str
spin treatment

_get_tag(self, tag, val)

 

Generate an XML tag

Parameters:
  • tag (str) - Tag name
  • val (str) - Tag value
Returns: str
Empty str if tag is None, otherwise the tag

__str__(self)
(Informal representation operator)

 

Return XML.

Returns: str
XML string
Overrides: object.__str__