schrodinger.application.desmond.constants module

Define common numerical constants, CT and atom property names, and keyword values (enums).

Copyright Schrodinger, LLC. All rights reserved.

class schrodinger.application.desmond.constants.Constants

Bases: object

Related constants can inherit from Constants to make them iterable in the order of their declarations.

class schrodinger.application.desmond.constants.MaePropertyName(name: str, **kwargs)

Bases: str

This class defines a container for structure or atom level properties. The property key can be accessed directly, while enum values are accessed via the VAL attribute.

Example usage: CT_TYPE = MaePropertyName(FFIO_DATA_CT_TYPE, FULL_SYSTEM=FFIO_FULL_SYSTEM)

ct.property[CT_TYPE] = CT_TYPE.VAL.FULL_SYSTEM valid_ct_types = list(CT_TYPE.VAL)

__init__(name: str, **kwargs)
__contains__(key, /)

Return key in self.

__len__()

Return len(self).

capitalize()

Return a capitalized version of the string.

More specifically, make the first character have upper case and the rest lower case.

casefold()

Return a version of the string suitable for caseless comparisons.

center(width, fillchar=' ', /)

Return a centered string of length width.

Padding is done using the specified fill character (default is a space).

count(sub[, start[, end]]) int

Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

encode(encoding='utf-8', errors='strict')

Encode the string using the codec registered for encoding.

encoding

The encoding in which to encode the string.

errors

The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith(suffix[, start[, end]]) bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

expandtabs(tabsize=8)

Return a copy where all tab characters are expanded using spaces.

If tabsize is not given, a tab size of 8 characters is assumed.

find(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format(*args, **kwargs) str

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).

format_map(mapping) str

Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).

index(sub[, start[, end]]) int

Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

isalnum()

Return True if the string is an alpha-numeric string, False otherwise.

A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.

isalpha()

Return True if the string is an alphabetic string, False otherwise.

A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.

isascii()

Return True if all characters in the string are ASCII, False otherwise.

ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.

isdecimal()

Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.

isdigit()

Return True if the string is a digit string, False otherwise.

A string is a digit string if all characters in the string are digits and there is at least one character in the string.

isidentifier()

Return True if the string is a valid Python identifier, False otherwise.

Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.

islower()

Return True if the string is a lowercase string, False otherwise.

A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.

isnumeric()

Return True if the string is a numeric string, False otherwise.

A string is numeric if all characters in the string are numeric and there is at least one character in the string.

isprintable()

Return True if the string is printable, False otherwise.

A string is printable if all of its characters are considered printable in repr() or if it is empty.

isspace()

Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.

istitle()

Return True if the string is a title-cased string, False otherwise.

In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.

isupper()

Return True if the string is an uppercase string, False otherwise.

A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.

join(iterable, /)

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

ljust(width, fillchar=' ', /)

Return a left-justified string of length width.

Padding is done using the specified fill character (default is a space).

lower()

Return a copy of the string converted to lowercase.

lstrip(chars=None, /)

Return a copy of the string with leading whitespace removed.

If chars is given and not None, remove characters in chars instead.

static maketrans()

Return a translation table usable for str.translate().

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.

partition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing the original string and two empty strings.

replace(old, new, count=- 1, /)

Return a copy with all occurrences of substring old replaced by new.

count

Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.

If the optional argument count is given, only the first count occurrences are replaced.

rfind(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex(sub[, start[, end]]) int

Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation.

Raises ValueError when the substring is not found.

rjust(width, fillchar=' ', /)

Return a right-justified string of length width.

Padding is done using the specified fill character (default is a space).

rpartition(sep, /)

Partition the string into three parts using the given separator.

This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.

If the separator is not found, returns a 3-tuple containing two empty strings and the original string.

rsplit(sep=None, maxsplit=- 1)

Return a list of the words in the string, using sep as the delimiter string.

sep

The delimiter according which to split the string. None (the default value) means split according to any whitespace, and discard empty strings from the result.

maxsplit

Maximum number of splits to do. -1 (the default value) means no limit.

Splits are done starting at the end of the string and working to the front.

rstrip(chars=None, /)

Return a copy of the string with trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

split(sep=None, maxsplit=- 1)

Return a list of the words in the string, using sep as the delimiter string.

sep

The delimiter according which to split the string. None (the default value) means split according to any whitespace, and discard empty strings from the result.

maxsplit

Maximum number of splits to do. -1 (the default value) means no limit.

splitlines(keepends=False)

Return a list of the lines in the string, breaking at line boundaries.

Line breaks are not included in the resulting list unless keepends is given and true.

startswith(prefix[, start[, end]]) bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip(chars=None, /)

Return a copy of the string with leading and trailing whitespace removed.

If chars is given and not None, remove characters in chars instead.

swapcase()

Convert uppercase characters to lowercase and lowercase characters to uppercase.

title()

Return a version of the string where each word is titlecased.

More specifically, words start with uppercased characters and all remaining cased characters have lower case.

translate(table, /)

Replace each character in the string using the given translation table.

table

Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.

The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.

upper()

Return a copy of the string converted to uppercase.

zfill(width, /)

Pad a numeric string with zeros on the left, to fill a field of the given width.

The string is never truncated.

class schrodinger.application.desmond.constants.Conversion

Bases: object

KCAL_TO_JOUL = 4184.0
CAL_CM_TO_MPA = 0.48888
AU_TO_KG = 1.6605655
class schrodinger.application.desmond.constants.EXISTING_RESTRAINT

Bases: schrodinger.application.desmond.constants.Constants

RETAIN = 'retain'
IGNORE = 'ignore'
IGNORE_POSRE = 'ignore_posre'
class schrodinger.application.desmond.constants.WATER_MODELS

Bases: schrodinger.application.desmond.constants.Constants

SPC = 'SPC'
SPCE = 'SPCE'
TIP3P = 'TIP3P'
TIP3P_CHARMM = 'TIP3P_CHARMM'
TIP4P = 'TIP4P'
TIP4PEW = 'TIP4PEW'
TIP4P2005 = 'TIP4P2005'
TIP5P = 'TIP5P'
TIP4PD = 'TIP4PD'
class schrodinger.application.desmond.constants.CUSTOM_CHARGE_MODE

Bases: schrodinger.application.desmond.constants.Constants

KEEP = 'keep'
CLEAR = 'clear'
ASSIGN = 'assign'
class schrodinger.application.desmond.constants.FEP_TYPES

Bases: schrodinger.application.desmond.constants.Constants

PRM_PROTEIN_BINDING = 'prm_protein_binding'
PRM_LIGAND_BINDING = 'prm_ligand_binding'
PRM_THERMOSTABILITY = 'prm_thermostability'
PROTEIN_STABILITY = 'prm_stability'
PROTEIN_SELECTIVITY = 'protein_selectivity'
COVALENT_LIGAND = 'covalent_ligand'
SMALL_MOLECULE = 'small_molecule'
METALLOPROTEIN = 'metalloprotein'
LIGAND_SELECTIVITY = 'ligand_selectivity'
ABSOLUTE_BINDING = 'absolute_binding'
SOLUBILITY = 'solubility'
schrodinger.application.desmond.constants.is_combined_protein_fep(fep_type: str)

Return whether the fep_type is one of the combiend protein fep types.

class schrodinger.application.desmond.constants.SIMULATION_PROTOCOL

Bases: schrodinger.application.desmond.constants.Constants

DEFAULT = 'default'
CHARGED = 'charge'
FORMALCHARGED = 'charge0'
COREHOPPING = 'core-hopping'
MACROCYCLE_COREHOPPING = 'macrocycle-core-hopping'
FRAGMENT_LINKING = 'fragment-linking'
class schrodinger.application.desmond.constants.REST_PROPERTIES

Bases: schrodinger.application.desmond.constants.Constants

SOLVENT_HOTREGION = 'i_rest_solvent_hotregion'
COMPLEX_HOTREGION = 'i_rest_complex_hotregion'
class schrodinger.application.desmond.constants.REST_COMPONENT

Bases: schrodinger.application.desmond.constants.Constants

ENVIRONMENT = 'environment'
RECEPTOR = 'receptor'
MEMBRANE = 'membrane'
LIGAND = 'ligand'
COMPLEX = 'complex'
class schrodinger.application.desmond.constants.REST_REGION_RULE

Bases: schrodinger.application.desmond.constants.Constants

DEFAULT = 'default'
ALL = 'all'
class schrodinger.application.desmond.constants.IsotropyPolicy

Bases: schrodinger.application.desmond.constants.Constants

ISOTROPIC = 'isotropic'
SEMI_ISOTROPIC = 'semi_isotropic'
CONSTANT_AXIS_A = 'constant_axis_a'
CONSTANT_AXIS_B = 'constant_axis_b'
CONSTANT_AXIS_C = 'constant_axis_c'
ANISOTROPIC = 'anisotropic'
FLEXIBLE = 'flexible'
class schrodinger.application.desmond.constants.ConfRestraintType

Bases: schrodinger.application.desmond.constants.Constants

BACKBONE = 'backbone'
SIDECHAIN = 'sidechain'
CALPHA_RUNG = 'calpha_rung'
class schrodinger.application.desmond.constants.FepLegTypes

Bases: schrodinger.application.desmond.constants.Constants

Leg types which represent a type of FEP simulation such as the complex leg in small molecule FEP or the hydration leg in FEP solubility.

These leg types are sometimes referred to as alchemical legs.

COMPLEX = 'complex'
SOLVENT = 'solvent'
FRAGMENT = 'fragment'
VACUUM = 'vacuum'
SUBLIMATION = 'sublimation'
HYDRATION = 'hydration'
SOLVATION = 'solvation'
FRAGMENT_HYDRATION = 'solvent_fragment_hydration'
RESTRAINED_FRAGMENT_HYDRATION = 'solvent_restrained_fragment_hydration'
MD = 'md'
class schrodinger.application.desmond.constants.PhysicalLegTypes

Bases: schrodinger.application.desmond.constants.Constants

Leg types which represent physical processes such as ligand binding or dissolution.

A given physical leg type generally corresponds to a consistent set of simulation types (which are sometimes referred to as alchemical leg types,) and which here are denoted as comments next to each value.

BINDING = 'binding'
FOLDING = 'folding'
SOLVATION = 'solvation'
AQUEOUS_DISSOLUTION = 'aqueous_dissolution'
SOLUBILITY_SOLVATION = 'solubility_solvation'
HYDRATION = 'hydration'
class schrodinger.application.desmond.constants.Ensembles

Bases: schrodinger.application.desmond.constants.Constants

NVE = 'NVE'
NVT = 'NVT'
NPT = 'NPT'
MUVT = 'muVT'
class schrodinger.application.desmond.constants.RestrainTypes

Bases: schrodinger.application.desmond.constants.Constants

POS = 'pos'
POS_FBHW = 'posfbhw'
STRETCH_FBHW = 'stretchfbhw'
ANGLE_FBHW = 'anglefbhw'
IMPROPER_FBHW = 'improperfbhw'
class schrodinger.application.desmond.constants.Schedule

Bases: schrodinger.application.desmond.constants.Constants

DEFAULT = 'default'
FLEXIBLE = 'flexible'
CHARGE = 'charge'
class schrodinger.application.desmond.constants.IdConversion

Bases: schrodinger.application.desmond.constants.Constants

COMPONENT_TO_COMBINED = 'component_to_combined'
ATOM_TOTAL = 'atom_total'
PSEUDO_END = 'pseudo_end'
PARENT2PSEUDO = 'parent_to_pseudo'
PSEUDO2PARENT = 'pseudo_to_parent'
TOPOLOGY = 'topology'
class schrodinger.application.desmond.constants.CorrectionTerm

Bases: schrodinger.application.desmond.constants.Constants

PKA = 'pKa'
STATE_PENALTY = 'State Penalty'
UNKNOWN = 'Unknown'
BORESCH_RESTRAINT = 'Boresch Restraint'
FRAGMENT_SOLVATION = 'Fragment Solvation'
POPULATION = 'Population'
class schrodinger.application.desmond.constants.FEP_STATE_KEYS

Bases: schrodinger.application.desmond.constants.Constants

WT = 'wt'
MUT = 'mut'
class schrodinger.application.desmond.constants.ENERGY_GROUPS

Bases: schrodinger.application.desmond.constants.Constants

PRESSURE_TENSOR = 'pressure_tensor'
CORR_ENERGY = 'corr_energy'
SELF_ENERGY_ONLY = 'self_energy_only'
CROSS_ENERGY_ONLY = 'cross_energy_only'
GCMC_INFO = 'gcmc_info'
SIMULATION_BOX = 'simulation_box'
class schrodinger.application.desmond.constants.SystemType

Bases: schrodinger.application.desmond.constants.Constants

ALCHEMICAL = 1
BINDING = 2
OTHER = 0
class schrodinger.application.desmond.constants.PRODUCT

Bases: schrodinger.application.desmond.constants.Constants

FEP = 'fep'
CONSTANT_PH = 'constant_ph'
IFD_MD = 'ifd-md'
class schrodinger.application.desmond.constants.UiMode(value)

Bases: enum.Enum

An enumeration.

NEW = 1
RESTART = 2
EXTEND = 3
class schrodinger.application.desmond.constants.BUILD_GEOMETRY

Bases: schrodinger.application.desmond.constants.Constants

NAME = 'build_geometry'
REMOVE_OVERLAPPED_SOLVENT = 'remove_overlapped_solvent'
class schrodinger.application.desmond.constants.SYSTEM_BUILDER_INP

Bases: schrodinger.application.desmond.constants.Constants

CHECK_SOLVENT_OVERLAP = 'check_solvent_overlap'
class schrodinger.application.desmond.constants.SkipFepReason(value)

Bases: enum.Enum

An enumeration.

HIGH_RMSD = 'High ligand RMSD in binding site'
class schrodinger.application.desmond.constants.SidedError

Bases: object

Types of sided errors. It’s used in the context of the experimental dg to indicate whether the measured experimental dg is an upper bound, lower bound or within the range of the measurement procedure.

  • TOP: the measured experimental dg is a lower bound, and the actual value

    can be higher

  • BOTTOM: the measured experimental dg is an upper bound, and the actual

    value can be lower

  • CENTER: the experimental dg is within the range of the measurement

  • ALL: all sided errors.

TOP = 1

Error to +inf

CENTER = 0

no sided error

BOTTOM = -1

Error to -inf

ALL = (1, 0, -1)