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

Module desmondutils

Functions [hide private]
float
determine_box_size(struct)
Determine the size of a cubic box that encloses the entire structure
 
add_cubic_chorus_box_props(struct)
Add the Chorus box properties to the structure for a cubic box
 
store_chorus_box_props(struct, ax, ay=0.0, az=0.0, bx=0.0, by=None, bz=0.0, cx=0.0, cy=0.0, cz=None)
Add properties to the structure that define the periodic boundary condition in the way Desmond wants it defined.
bool
has_chorus_box_props(struct)
Check if the structure has all the Chorus box properties
bool
has_space_group_pbc_props(struct)
Check if the structure has all the space group PBC properties
bool
has_crystal_builder_pbc_props(struct)
Check if the structure has all the crystal builder PBC properties
(str, str)
write_builder_input(struct, out_name, forcefield=OPLS2005, rezero_system=True)
Write input for the Desmond System Builder
str or None
run_system_builder(struct, output_basename, forcefield=OPLS2005, rezero_system=True, logger=None)
Run the Desmond multisim system builder
list
find_forcefield_invalid_structures(structs, ffield_num)
Check structures to see if the specified forcefield is valid for them
(str or None, int)
validate_ff_name_and_get_number(name)
Check that the given name is a valid force field name and if so, return the mmffld number associated with that name
Variables [hide private]
  __doc__ = ...
  DESMOND_TYPE_PROP = 's_ffio_ct_type'
  COMMAND_TEXT = ...
  OPLS2005 = mm.mmffld_get_ffld_name(14)
  CHORUS_PROP_PREFIX = 'r_chorus_box_'
  CHORUS_CUBIC_PROPS = [CHORUS_PROP_PREFIX+ x for x in ['ax', 'b...
  CHORUS_NON_CUBIC_PROPS = [CHORUS_PROP_PREFIX+ x for x in ['ay'...
  CHORUS_BOX_ALL_PROPS = CHORUS_CUBIC_PROPS+ CHORUS_NON_CUBIC_PROPS
  PDB_CRYSTAL_PROPS = [xtal.Crystal.A_KEY, xtal.Crystal.B_KEY, x...
  BC_BOX_PROPS = [xtal.BC_BOX_A_KEY, xtal.BC_BOX_B_KEY, xtal.BC_...
Function Details [hide private]

determine_box_size(struct)

 

Determine the size of a cubic box that encloses the entire structure

Parameters:
Returns: float
The largest span in the X, Y or Z direction

add_cubic_chorus_box_props(struct)

 

Add the Chorus box properties to the structure for a cubic box

Parameters:

store_chorus_box_props(struct, ax, ay=0.0, az=0.0, bx=0.0, by=None, bz=0.0, cx=0.0, cy=0.0, cz=None)

 

Add properties to the structure that define the periodic boundary condition in the way Desmond wants it defined.

Parameters:
  • struct (schrodinger.structure.Structure) - The structure to add the properties to
  • ax - The value of the ax box property
  • ay - The value of the ay box property. Defaults to 0.
  • az - The value of the az box property. Defaults to 0.
  • bx - The value of the bx box property. Defaults to 0.
  • by - The value of the by box property. If not given, this value is set the same as ax.
  • bz - The value of the bz box property. Defaults to 0.
  • cx - The value of the cx box property. Defaults to 0.
  • cy - The value of the cy box property. Defaults to 0.
  • cz - The value of the cz box property. If not given, this value is set the same as ax.

has_chorus_box_props(struct)

 

Check if the structure has all the Chorus box properties

Parameters:
Returns: bool
Whether the structure has all the chorus box properties

has_space_group_pbc_props(struct)

 

Check if the structure has all the space group PBC properties

Parameters:
Returns: bool
Whether the structure has all the space group pbc properties

has_crystal_builder_pbc_props(struct)

 

Check if the structure has all the crystal builder PBC properties

Parameters:
Returns: bool
Whether the structure has all the space group pbc properties

write_builder_input(struct, out_name, forcefield=OPLS2005, rezero_system=True)

 

Write input for the Desmond System Builder

Parameters:
  • struct (schrodinger.structure.Structure) - The structure to run the system builder on
  • out_name (str) - The base name for the output files
  • forcefield (str) - The forcefield to use
  • rezero_system (bool) - Whether to move the center of mass to the origin
Returns: (str, str)
The names of the .msj and .mae files that were created

run_system_builder(struct, output_basename, forcefield=OPLS2005, rezero_system=True, logger=None)

 

Run the Desmond multisim system builder

Parameters:
  • struct (schrodinger.structure.Structure) - The structure to run the system builder on. If the chorus box properties are not set to define the periodic boundary condition, a cubic PBC will be imposed based on the largest span of the X, Y or Z coordinates.
  • output_basename (str) - The base name of the output file
  • forcefield (str) - The name of the force field to use. The default is 'OPLS_2005'. Note that any custom directory needed for OPLS3 is taken care of via the runtime environment as long as the script was launched via launcher with the oplsdir argument.
  • rezero_system (bool) - Whether to move the center of mass to the origin
  • logger (logging.Logger) - The logger to use to record any messages. If None, the messages are printed.
Returns: str or None
The name of the resulting .cms file, or None if the file was not produced successfully

find_forcefield_invalid_structures(structs, ffield_num)

 

Check structures to see if the specified forcefield is valid for them

Parameters:
Returns: list
A list containing all the structures that fail the force field test. The list is empty if all structures are valid for the force field

validate_ff_name_and_get_number(name)

 

Check that the given name is a valid force field name and if so, return the mmffld number associated with that name

Parameters:
  • name (str) - The force field name to check
Returns: (str or None, int)
The first item is an error message if an error occurred. The second item is the mmffld integer for the given forcefield, or 0 if an error occurred.

Variables Details [hide private]

__doc__

Value:
"""
Utilities for working with Desmond.

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

COMMAND_TEXT

Value:
"""
task { task = "desmond:auto" }
assign_forcefield { compress = "" }
"""

CHORUS_CUBIC_PROPS

Value:
[CHORUS_PROP_PREFIX+ x for x in ['ax', 'by', 'cz']]

CHORUS_NON_CUBIC_PROPS

Value:
[CHORUS_PROP_PREFIX+ x for x in ['ay', 'az', 'bx', 'bz', 'cx', 'cy']]

PDB_CRYSTAL_PROPS

Value:
[xtal.Crystal.A_KEY, xtal.Crystal.B_KEY, xtal.Crystal.C_KEY, xtal.Crys\
tal.ALPHA_KEY, xtal.Crystal.BETA_KEY, xtal.Crystal.GAMMA_KEY]

BC_BOX_PROPS

Value:
[xtal.BC_BOX_A_KEY, xtal.BC_BOX_B_KEY, xtal.BC_BOX_C_KEY, xtal.BC_BOX_\
ALPHA_KEY, xtal.BC_BOX_BETA_KEY, xtal.BC_BOX_GAMMA_KEY, xtal.Crystal.L\
ATTICE_VECTOR_A_KEY, xtal.Crystal.LATTICE_VECTOR_B_KEY, xtal.Crystal.L\
ATTICE_VECTOR_C_KEY]