Package schrodinger :: Package application :: Package matsci :: Package nano :: Module xtal :: Class CheckInput
[hide private]
[frames] | no frames]

Class CheckInput

object --+
         |
        CheckInput

Check user input.

Instance Methods [hide private]
 
checkInputFile(self, input_file)
Check input file.
 
checkASU(self, asu, logger=None)
Check the asymmetric unit structure object.
bool
checkFractionalDefs(self, asu, logger=None)
Check the fractional coordinate definitions.
 
checkFractionalRedundancies(self, asu, fract_offset, logger=None)
Check the redundancy of fractional coordinate definitions.
 
checkSpaceGroup(self, space_group, space_group_short_names, space_group_full_names, logger=None)
Check the specified space group.
six floats
checkLatticeParameterType(self, a_param, b_param, c_param, alpha_param, beta_param, gamma_param, logger=None)
Check the data types of the specified lattice parameters.
float, float, float
checkLatticeAngleValues(self, alpha, beta, gamma, logger=None)
Check the values of the specified lattice angles.
float, float, float
checkLatticeLengths(self, a_param, b_param, c_param, crystal_system)
Check the specified lattice lengths.
float, float, float
checkLatticeAngles(self, alpha, beta, gamma, crystal_system)
Check the specified lattice angles.
six floats and crystal system object
checkLatticeParameters(self, a_param, b_param, c_param, alpha_param, beta_param, gamma_param, crystal_system, logger=None)
Check the specified lattice parameters.
six floats
checkP1LatticeParameters(self, a_param, b_param, c_param, alpha_param, beta_param, gamma_param, logger=None)
Check the specified P1 lattice parameters.
 
checkLatticeMaxVolume(self, a_param, b_param, c_param, logger=None)
Using the lattice lengths check the maximum volume.
 
checkNumUnitCellParams(self, ncella, ncellb, ncellc, logger=None)
Check the number of unit cells requested by the user.
list
checkOrigin(self, origin)
Check the origin.
 
checkBondingAndTranslate(self, bonding, bond_orders, translate, logger=None)
Check the bonding and translate options.

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

Class Variables [hide private]
  TITLE_KEY = 's_m_title'
  ENTRY_NAME_KEY = 's_m_entry_name'
  SAME_LENGTH_THRESH = 0.001
  SAME_ANGLE_THRESH = 0.001
  RIGHT_ANGLE = 90.0
  ONETWENTY_ANGLE = 120.0
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

checkInputFile(self, input_file)

 

Check input file.

Parameters:
  • input_file (str) - the name of the input file

checkASU(self, asu, logger=None)

 

Check the asymmetric unit structure object.

Parameters:
  • asu (schrodinger.Structure.structure) - the structure object of the asymmetric unit
  • logger (logging.getLogger) - output logger

checkFractionalDefs(self, asu, logger=None)

 

Check the fractional coordinate definitions.

Parameters:
  • asu (schrodinger.Structure.structure) - the structure object of the asymmetric unit
  • logger (logging.getLogger) - output logger
Returns: bool
fractional_coords, flag to indicate if the set of fractional coordinate properties exist

checkFractionalRedundancies(self, asu, fract_offset, logger=None)

 

Check the redundancy of fractional coordinate definitions.

Parameters:
  • asu (schrodinger.Structure.structure) - the structure object of the asymmetric unit
  • fract_offset (float) - the threshold used to compare floating point fractional coordinate values and in particular those that are on the cell boundary
  • logger (logging.getLogger) - output logger

checkSpaceGroup(self, space_group, space_group_short_names, space_group_full_names, logger=None)

 

Check the specified space group.

Parameters:
  • space_group (str) - the specified space group
  • space_group_short_names (list of strs) - the short names of the space groups supported by this script
  • space_group_full_names (list of strs) - the full names of the space groups supported by this script
  • logger (logging.getLogger) - output logger

checkLatticeParameterType(self, a_param, b_param, c_param, alpha_param, beta_param, gamma_param, logger=None)

 

Check the data types of the specified lattice parameters.

Parameters:
  • a_param (float) - lattice vector a in Angstrom
  • b_param (float) - lattice vector b in Angstrom
  • c_param (float) - lattice vector c in Angstrom
  • alpha_param (float) - lattice angle alpha in degrees
  • beta_param (float) - lattice angle beta in degrees
  • gamma_param (float) - lattice angle gamma in degrees
  • logger (logging.getLogger) - output logger
Returns: six floats
a_param, b_param, c_param, alpha_param, beta_param, gamma_param

checkLatticeAngleValues(self, alpha, beta, gamma, logger=None)

 

Check the values of the specified lattice angles.

Parameters:
  • alpha (float) - lattice angle alpha in degrees
  • beta (float) - lattice angle beta in degrees
  • gamma (float) - lattice angle gamma in degrees
  • logger (logging.getLogger) - output logger
Returns: float, float, float
alpha_new, beta_new, gamma_new, updated lattice angles

checkLatticeLengths(self, a_param, b_param, c_param, crystal_system)

 

Check the specified lattice lengths.

Parameters:
  • a_param (float) - lattice vector a in Angstrom
  • b_param (float) - lattice vector b in Angstrom
  • c_param (float) - lattice vector c in Angstrom
  • crystal_system (one of the seven crystal system objects) - the crystal system to check the lattice lengths against
Returns: float, float, float
lengths, elements thereof

checkLatticeAngles(self, alpha, beta, gamma, crystal_system)

 

Check the specified lattice angles.

Parameters:
  • alpha (float) - lattice angle alpha in degrees
  • beta (float) - lattice angle beta in degrees
  • gamma (float) - lattice angle gamma in degrees
  • crystal_system (one of the seven crystal system objects) - the crystal system to check the lattice angles against
Returns: float, float, float
angles, elements thereof

checkLatticeParameters(self, a_param, b_param, c_param, alpha_param, beta_param, gamma_param, crystal_system, logger=None)

 

Check the specified lattice parameters.

Parameters:
  • a_param (float) - lattice vector a in Angstrom
  • b_param (float) - lattice vector b in Angstrom
  • c_param (float) - lattice vector c in Angstrom
  • alpha_param (float) - lattice angle alpha in degrees
  • beta_param (float) - lattice angle beta in degrees
  • gamma_param (float) - lattice angle gamma in degrees
  • crystal_system (one of the seven crystal system objects) - the crystal system to check the lattice parameters against
  • logger (logging.getLogger) - output logger
Returns: six floats and crystal system object
a_param, b_param, c_param, alpha_param, beta_param, gamma_param, crystal_system in case it was changed to hexagonal from trigonal

checkP1LatticeParameters(self, a_param, b_param, c_param, alpha_param, beta_param, gamma_param, logger=None)

 

Check the specified P1 lattice parameters.

Parameters:
  • a_param (float) - lattice vector a in Angstrom
  • b_param (float) - lattice vector b in Angstrom
  • c_param (float) - lattice vector c in Angstrom
  • alpha_param (float) - lattice angle alpha in degrees
  • beta_param (float) - lattice angle beta in degrees
  • gamma_param (float) - lattice angle gamma in degrees
  • logger (logging.getLogger) - output logger
Returns: six floats
a_param, b_param, c_param, alpha_param, beta_param, gamma_param

checkLatticeMaxVolume(self, a_param, b_param, c_param, logger=None)

 

Using the lattice lengths check the maximum volume.

Parameters:
  • a_param (float) - lattice vector a in Angstrom
  • b_param (float) - lattice vector b in Angstrom
  • c_param (float) - lattice vector c in Angstrom
  • logger (logging.getLogger) - output logger

checkNumUnitCellParams(self, ncella, ncellb, ncellc, logger=None)

 

Check the number of unit cells requested by the user.

Parameters:
  • ncella (int) - number of unit cells along lattice vector a
  • ncellb (int) - number of unit cells along lattice vector b
  • ncellc (int) - number of unit cells along lattice vector c
  • logger (logging.getLogger) - output logger

checkOrigin(self, origin)

 

Check the origin.

Parameters:
  • origin (list or None) - the unit cell origin, list of three floats, in fractional coordinates or None if not provided
Returns: list
the unit cell origin, list of three floats, in fractional coordintes

checkBondingAndTranslate(self, bonding, bond_orders, translate, logger=None)

 

Check the bonding and translate options.

Parameters:
  • bonding (str) - specify how the bonding should be handled
  • bond_orders (str) - specify how the bond orders should be handled
  • translate (str) - specify how the translation to the first unit cell should be handled
  • logger (logging.getLogger) - output logger