Package schrodinger :: Package application :: Package matsci :: Package nano :: Module interface_mod
[hide private]
[frames] | no frames]

Module interface_mod

Classes and functions to create interface models.

Copyright Schrodinger, LLC. All rights reserved.

Classes [hide private]
  ParserWrapper
Manages the argparse module to parse user command line arguments.
  Interface
Manage the building of an interface model.
Functions [hide private]
str
get_formulas_basename(unit_cell_1, unit_cell_2)
Return a formatted basename containing the two unit cell formulas for the given two unit cells.
tuple, tuple
lcm_approx(smaller, larger, tolerance=0.0, max_mult=10, threshold=1e-10)
From the two given numbers return two least common multiples (LCMs) that are within the specified tolerance of each other.
str
list_to_string(alist, accuracy=3, separator=', ')
Return a formatted string containing the floats in the given list rounded to the given accuracy and separated by the given separator.
 
del_atom_props(astructure, keys=['s_matsci_f1f2f3', 'r_matsci_f1', 'r_matsci_f2', 'r_matsci_f3'])
Delete the given atom properties from the given structure.
Variables [hide private]
  __doc__ = ...
  _version = '$Revision 0.0 $'
  REFERENCE = 'reference'
  ADSORPTION = 'adsorption'
  BOTTOM_LAYER_CHOICES = ['reference', 'adsorption']
  BOTTOM_LAYER_DEFAULT = 'reference'
  STRAIN_A_DEFAULT = 0.5
  STRAIN_B_DEFAULT = 0.5
  STRAIN_GAMMA_DEFAULT = 5.0
  SEPARATION_DEFAULT = 0.0
  MAX_MULT = 10
  MAX_EXTENTS_DEFAULT = 10
  TRANSLATE_A_DEFAULT = 0.0
  TRANSLATE_B_DEFAULT = 0.0
  INTERFACE = 'interface'
  FRACT_KEYS = ['s_matsci_f1f2f3', 'r_matsci_f1', 'r_matsci_f2',...
  ENTRY_NAME_KEY = 's_m_entry_name'
  CHOICE_OFF = 'off'
  CHOICE_ON = 'on'
  XTAL_DICT = {'bond_orders': 'off', 'bonding': 'off', 'translat...
  ALPHA_IDX = 3
hash(x)
  A_IDX = 0
hash(x)
  BETA_IDX = 4
  B_IDX = 1
  C_IDX = 2
  GAMMA_IDX = 5
  __package__ = 'schrodinger.application.matsci.nano'
Function Details [hide private]

get_formulas_basename(unit_cell_1, unit_cell_2)

 

Return a formatted basename containing the two unit cell formulas for the given two unit cells.

Parameters:
Returns: str
the formatted basename containing the two unit cell formulas

lcm_approx(smaller, larger, tolerance=0.0, max_mult=10, threshold=1e-10)

 

From the two given numbers return two least common multiples (LCMs) that are within the specified tolerance of each other. If the numbers are integers and the tolerance is zero then this function is equivalent to the traditional LCM and the two returned LCMs will be identical integers. Raise a ValueError if either integer multiplier is larger than the given maximum.

Parameters:
  • smaller (float) - the smaller number
  • larger (float) - the larger number
  • tolerance (float) - a parameter controlling the extent to which two floats may be considered equivalent
  • max_mult (int) - the maximum allowable multiplier, supported to avoid potentially very long loops given that the inputs are floats compared using a specified tolerance
  • threshold (float) - a parameter controlling numerical precision
Returns: tuple, tuple
the first tuple contains the two LCMs, the second contains the two integer multipliers, i.e. those integers which when multiplied by the inputs produce the LCMs
Raises:
  • ValueError - if either integer multipler is larger than the given maximum

list_to_string(alist, accuracy=3, separator=', ')

 

Return a formatted string containing the floats in the given list rounded to the given accuracy and separated by the given separator.

Parameters:
  • alist (list) - list of floats
  • accuracy (int) - used to round the floats
  • separator (str) - used to separate the rounded floats
Returns: str
the formatted string

del_atom_props(astructure, keys=['s_matsci_f1f2f3', 'r_matsci_f1', 'r_matsci_f2', 'r_matsci_f3'])

 

Delete the given atom properties from the given structure.

Parameters:

Variables Details [hide private]

__doc__

Value:
"""
Classes and functions to create interface models.

Copyright Schrodinger, LLC.  All rights reserved."""

FRACT_KEYS

Value:
['s_matsci_f1f2f3', 'r_matsci_f1', 'r_matsci_f2', 'r_matsci_f3']

XTAL_DICT

Value:
{'bond_orders': 'off', 'bonding': 'off', 'translate': 'off'}