schrodinger.application.desmond.test_utils module

schrodinger.application.desmond.test_utils.unzip_and_get_membrane_test_files(fep_type: str) Tuple[str, str, str]

Unzip test files for the membrane launcher workflow into cwd and return filenames. The first file is the expected .fmp input file for the membrane launcher stage, the second file is the expected .cms output file from the multisim job and the third file is the expected .fmp output file from the stage.

exception schrodinger.application.desmond.test_utils.InvalidTagError

Bases: Exception

Custom exception so invalid tags can be specifically captured.

__init__(*args, **kwargs)
args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

class schrodinger.application.desmond.test_utils.FileRegistrationTag(value)

Bases: enum.Enum

An enumeration.

FEP_PLUS = 'fep_plus'
MXMD = 'mxmd'
SOLUBILITY = 'solubility'
LAMBDA_DYNAMICS = 'lambda_dynamics'
LIGAND = 'ligand'
RECEPTOR = 'receptor'
MEMBRANE = 'membrane'
SOLVENT = 'solvent'
COMPLEX = 'complex'
FRAGMENT = 'fragment'
ION = 'ion'
COSOLVENT = 'cosolvent'
CRYSTAL_WATER = 'crystal water'
POSITIVE_SALT = 'positive salt'
NEGATIVE_SALT = 'negative salt'
ALCHEMICAL_WATER = 'alchemical_water'
PRM_PROTEIN_BINDING = 'prm_protein_binding'
PRM_LIGAND_BINDING = 'prm_ligand_binding'
PROTEIN_STABILITY = 'prm_stability'
PRM_THERMOSTABILITY = 'prm_thermostability'
PROTEIN_SELECTIVITY = 'protein_selectivity'
COVALENT_LIGAND = 'covalent_ligand'
SMALL_MOLECULE = 'small_molecule'
METALLOPROTEIN = 'metalloprotein'
LIGAND_SELECTIVITY = 'ligand_selectivity'
ABSOLUTE_BINDING = 'absolute_binding'
DEFAULT = 'default_protocol'
CHARGED = 'charge_protocol'
FORMALCHARGED = 'charge0'
COREHOPPING = 'core-hopping'
MACROCYCLE_COREHOPPING = 'macrocycle-core-hopping'
FRAGMENT_LINKING = 'fragment-linking'
STAR_TOPOLOGY = 'star_topology'
WINDMILL_TOPOLOGY = 'windmill_topology'
NORMAL_TOPOLOGY = 'normal_topology'
FRAGMENT_HYDRATION = ('solvent_fragment_hydration',)
RESTRAINED_FRAGMENT_HYDRATION = 'solvent_restrained_fragment_hydration'
SOLVATION = 'solvation'
FEP_GROUPS = 'fep_groups'
COMPRESSED = 'compressed'
ENE = 'ene'
PROTEIN_PREP = 'protein_prep'
CSP = 'csp'
CONFORMER_GENERATION = 'conformer_generation'
exception schrodinger.application.desmond.test_utils.InvalidFileRegistrationError

Bases: Exception

Custom exception so file registration errors can be specifically captured.

__init__(*args, **kwargs)
args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

class schrodinger.application.desmond.test_utils.FileRegistration(path: pathlib.Path, tickets: List[str], description: str, tags: List[str])

Bases: object

Metadata container for a file that is registered in a FileRegistry.

Variables
  • path – Path to the file relative to the location of the registry.

  • tickets – Ticket(s) associated with the creation or modification of the test file.

  • description – A brief statement describing the contents and use of the test file.

  • tags – Key words that tag a particular file for ease of searching.

path: pathlib.Path
tickets: List[str]
description: str
tags: List[str]
__init__(path: pathlib.Path, tickets: List[str], description: str, tags: List[str]) None
class schrodinger.application.desmond.test_utils.FileRegistry(path: pathlib.Path, registry: mappingproxy)

Bases: object

Container for registered files used to access the absolute path of files during, e.g., a pytest session.

Variables
  • path – Path to the file registry data.

  • registry – Map between the filename and the file’s metadata.

path: pathlib.Path
registry: mappingproxy
classmethod load(registry_filename: pathlib.Path) schrodinger.application.desmond.test_utils.FileRegistryType

Load file registry and instantiate FileRegistry object.

Parameters

registry_filename – path to the file registry.

Returns

the loaded file registry

get_file_registration(filename: str) schrodinger.application.desmond.test_utils.FileRegistration

Return the FileRegistration for a particular filename.

Parameters

filename – the name of the file in the registry

Raises

ValueError – If filename is not registered.

get_file_path(filename: str) pathlib.Path

Return the path to the registered file.

Parameters

filename – the name of the file in the registry

Returns

the absolute path to the file

__init__(path: pathlib.Path, registry: mappingproxy) None