Package schrodinger :: Package application :: Package jaguar :: Package gui :: Module input_tab_widgets :: Class ProjEntry
[hide private]
[frames] | no frames]

Class ProjEntry

object --+
         |
        ProjEntry
Known Subclasses:

A class for accessing data about a project table row and the associated structure

Instance Methods [hide private]
 
__init__(self, row=None)
Instantiate a new object
 
update(self, row)
Update this entry with information from the provided row
 
_delayedChargeCalc(self)
Calculate the row charge and the number of protons if the values are out of date.
 
_updateRowCharge(self)
Update the molecular charge from the project table row.
 
reset(self)
Reset any user-specified settings
 
setIncluded(self, value)
Include or remove this entry from the workspace.
 
_calcNumProtons(self)
Calculate the number of protons in the current structure.
int
_calcCharge(self)
Calculate the formal charge on the molecule by summing the charge on each atom
tuple
getCharge(self)
Get the user-specified charge on the structure.
tuple
_getSpinMult(self, force_default)
Get the user-specified spin multiplicity on the structure.
tuple
getSpinMult(self)
Get the user-specified spin multiplicity on the structure.
int
getDefaultSpinMult(self)
Get the default spin multiplicity on the structure for the current charge
schrodinger.structure.Structure
getStructure(self)
Get the entry structure
 
setBasisFromText(self, basis)
Set the basis
int or NoneType
getIgnoredSpinMult(self)
If the user has set an invalid spin multiplicity, return it
bool
setSpinMult(self, spin_mult)
Set the spin multiplicity
tuple
getStrucChargeAndSpinMult(self)
Get the structure, charge, and spin multiplicity settings.

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

Properties [hide private]
  row_charge
Make sure we provide an up to date row charge value

Inherited from object: __class__

Method Details [hide private]

__init__(self, row=None)
(Constructor)

 

Instantiate a new object

Parameters:
Overrides: object.__init__

update(self, row)

 

Update this entry with information from the provided row

Parameters:

_delayedChargeCalc(self)

 

Calculate the row charge and the number of protons if the values are out of date. These calculations are delayed until necessary to avoid slowing down project table updates.

_updateRowCharge(self)

 

Update the molecular charge from the project table row. This value will be used if there is no user-specified charge in the table.

setIncluded(self, value)

 

Include or remove this entry from the workspace.

Parameters:
  • value (int) - A flag indicated whether the entry should be removed from the workspace (WS_REMOVE), included in the workspace(WS_INCLUDED), or set as the only entry in the workspace (WS_INCLUDE_ONLY)

_calcNumProtons(self)

 

Calculate the number of protons in the current structure. The result will be stored in self._num_protons.

_calcCharge(self)

 

Calculate the formal charge on the molecule by summing the charge on each atom

Returns: int
The formal charge of the molecule

getCharge(self)

 

Get the user-specified charge on the structure. If no charge has been set, the default charge will be returned.

Returns: tuple
A tuple of:
  • The charge (int)
  • Is this a user-specified charge (True) or the default charge (False)

_getSpinMult(self, force_default)

 

Get the user-specified spin multiplicity on the structure. If no spin multiplicity has been set or if the user-specified multiplicity is incompatible with the current charge, then the default spin multiplicity will be returned.

Parameters:
  • force_default (bool) - If True, the default spin multiplicity will always be returned even if there is a user-specified spin multiplicity
Returns: tuple
A tuple of:
  • The spin multiplicity (int)
  • Is this a user-specified spin multiplicity (True) or the default spin multiplicity (False)

getSpinMult(self)

 

Get the user-specified spin multiplicity on the structure. If no spin multiplicity has been set or if the user-specified multiplicity is incompatible with the current charge, then the default spin multiplicity will be returned.

Returns: tuple
A tuple of:
  • The spin multiplicity (int)
  • Is this a user-specified spin multiplicity (True) or the default spin multiplicity (False)

getDefaultSpinMult(self)

 

Get the default spin multiplicity on the structure for the current charge

Returns: int
The default spin multiplicity

getStructure(self)

 

Get the entry structure

Returns: schrodinger.structure.Structure
The structure object

setBasisFromText(self, basis)

 

Set the basis

Parameters:
  • basis (str) - The full basis set name including *'s and +'s

getIgnoredSpinMult(self)

 

If the user has set an invalid spin multiplicity, return it

Returns: int or NoneType
If the user has set a spin multiplicity but it's being ignored, return the user-specified spin multiplicity. Otherwise, return None.

setSpinMult(self, spin_mult)

 

Set the spin multiplicity

Parameters:
  • spin_mult (int) - The spin multiplicity to set
Returns: bool
True if this is a valid spin multiplicity for the current charge. False otherwise.

getStrucChargeAndSpinMult(self)

 

Get the structure, charge, and spin multiplicity settings. (This is intended for use in loading data into a ProjEntryTuple object.)

Returns: tuple
A tuple of (entry_id, structure, charge, spin multiplicity)

Property Details [hide private]

row_charge

Make sure we provide an up to date row charge value

Get Method:
unreachable.row_charge(self) - Make sure we provide an up to date row charge value