schrodinger.application.desmond.gcmc_utils module¶
- schrodinger.application.desmond.gcmc_utils.add_inactive_solvent_file(ifile: str, solvent_file: str, ofile: str, **kwargs)¶
Opens the input file, calls
add_inactive_solvent
, and writes the result to a new file.- Parameters
ifile (
str
) – the input filenamesolvent_file (str) – the solvent filename
ofile (
str
) – the output filenamekwargs – keyword arguments passed to
add_inactive_solvent
- schrodinger.application.desmond.gcmc_utils.add_inactive_solvent(model: schrodinger.application.desmond.cms.Cms, solvent_model: schrodinger.application.desmond.cms.Cms, num_copies: int = 2000, copy: bool = False)¶
Appends
num_copies
copies of the molecules in the supplied solvent model to either system’s solvent CT if it exists or otherwise a new solvent CT. These changes are propagated to the fullsystem CT as well.- Parameters
model (
cms.Cms
) – the model to add inactive solvent tosolvent_model (
cms.Cms
) – a cms model containing a solvent CT, can be the same asmodel
. NOTE - ifsolvent_model
contains different PBC’s thanmodel
, these PBC’s will not be honored, which could lead to ‘broken’ molecules.num_copies (
int
) – the number of inactive solvent molecules to addcopy (
bool
) – whether or not to return a copy of the input structure. Otherwise the input may be modified.
- Returns
the input model with solvent added
- Return type
cms.Cms
- schrodinger.application.desmond.gcmc_utils.remove_inactive_solvent_file(ifile: str, ofile: str)¶
Calls remove_inactive_solvent on a file and writes the result to a new file
- Parameters
ifile (
str
) – the input filenameofile (
str
) – the output filename
- schrodinger.application.desmond.gcmc_utils.remove_inactive_solvent(model: schrodinger.application.desmond.cms.Cms, copy_if_gcmc: bool = False)¶
Remove inactive solvent from the full system CT and the component CTs such that afterward the
comp_atom_total
will equal theactive_total
- Parameters
model (
cms.Cms
) – the Cms object from which to remove inactive solvent atomscopy_if_gcmc (
bool
) – whether or not to return a copy of the input structure to avoid side effects (ie, the removal of inactive solvent molecules). If the input model does not contain inactive solvent, it is always returned uncopied.
- Returns
the same Cms object or a copy with its inactive solvent atoms removed
- Return type
cms.Cms
- schrodinger.application.desmond.gcmc_utils.tag_gcmc_ligand_file(ifile: str, ofile: str, **kwargs)¶
Calls tag_gcmc_ligand on the input file and writes the results to the output file.
- Parameters
ifile (str) – the input filename
ofile (str) – the output filename
kwargs – keyword arguments passed to
tag_gcmc_ligand
- schrodinger.application.desmond.gcmc_utils.tag_gcmc_ligand(model: schrodinger.application.desmond.cms.Cms, tag_only_mutated: bool = False)¶
Finds the atoms of the ‘ligand molecule(s)’ and sets the
GCMC_LIGAND
property to 1. The ‘ligand molecule(s)’ is(are) defined as the molecule containing the first atom of the ligand ct(s), in order to exclude alchemical ions/water. If no ligand is found, or if atoms in the system contain theGCMC_LIGAND
property already, the system is returned unchanged. For FEP systems, both the reference and mutant ligands are tagged.- Parameters
model (
cms.Cms
) – The input cms objecttag_only_mutated – If false (default), all atoms in the cms model’s FEP cts are tagged. Otherwise, only atoms in the FEP cts which are mapped to dummy atoms are tagged. The case of mutated atoms that map to each other rather than to dummy atoms is not supported.
- Returns
The modified input cms object
- Return type
cms.Cms
- schrodinger.application.desmond.gcmc_utils.tag_gcmc_near_ligand_file(ifile: str, ofile: str, lig_file: str, cutoff_distance: float)¶
Calls tag_gcmc_near_ligand on the input file and writes it to the output file, using the given ligand file and cutoff distance.
- Parameters
ifile (str) – the input file
ofile (str) – the output file
lig_file (str) – the file containing the ligand model
cutoff_distance (float) – atoms within this distance of any ligand atom will be tagged
- schrodinger.application.desmond.gcmc_utils.tag_gcmc_near_ligand(model: schrodinger.application.desmond.cms.Cms, ligand_model: schrodinger.application.desmond.cms.Cms, cutoff_distance: float)¶
Tags solute atoms in the model that are within the cutoff distance of any atom in the ligand model by setting the
GCMC_LIGAND
atom property to 1.- Parameters
model (
cms.Cms
) – the input cms modelligand_model (
structure.Structure
) – the input ligand modelcutoff_distance (float) – solute atoms within this distance of any ligand atom will be tagged
- Returns
the modified input model
- Return type
cms.Cms
- schrodinger.application.desmond.gcmc_utils.ffio_delete_atoms(ffio_ct: schrodinger.application.desmond.ffiostructure.FFIOStructure, num_atoms: int)¶
Deletes the given number of atoms and a proportional number of pseudoatoms from the input CT.
- Parameters
ffio_ct (
cms.ffiostructure.FFIOStructure
) – The input ffio CTnum_atoms (
int
) – the number of atoms to delete
- schrodinger.application.desmond.gcmc_utils.ffio_extend_ct(ffio_ct: schrodinger.application.desmond.ffiostructure.FFIOStructure, other_ffio_ct: schrodinger.application.desmond.ffiostructure.FFIOStructure)¶
Extends an ffio CT with the atoms and pseudoatoms of another ffio CT. The CTs should each only contain copies of the same single molecule.
- Parameters
ffio_ct (
cms.ffiostructure.FFIOStructure
) – The input ffio CTother_ffio_ct (
cms.ffiostructure.FFIOStructure
) – The ffio CT to extend the input CT with
- schrodinger.application.desmond.gcmc_utils.equalize_number_waters(struc_files: List[str])¶
Deletes the waters from the marked component CTs of the structure files until each has the same number of waters.
- Parameters
struc_files ({str: (int, int)}) – a dictionary mapping the filenames of cms files to a tuple containing the index of their solvent CT and the total number of atoms in the system.