schrodinger.application.desmond.gcmc_utils module¶
-
schrodinger.application.desmond.gcmc_utils.
add_ghost_solvent_file
(ifile, solvent_file, ofile, **kwargs)¶ Opens the input file, calls
add_ghost_solvent
, and writes the result to a new file.Parameters: - ifile (
str
) – the input filename - solvent_file (str) – the solvent filename
- ofile (
str
) – the output filename - kwargs – keyword arguments passed to
add_ghost_solvent
- ifile (
-
schrodinger.application.desmond.gcmc_utils.
add_ghost_solvent
(model, solvent_model, num_copies=1000, copy=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 ghost solvent to - solvent_model – a cms model containing a solvent CT, can be the same
as
model
. NOTE - ifsolvent_model
contains different PBC’s thanmodel
, these PBC’s will not be honored, which could lead to ‘broken’ molecules. :type solvent_model:cms.Cms
Parameters: - num_copies (
int
) – the number of ghost solvent molecules to add - copy – whether or not to return a copy of the input structure.
Otherwise the input may be modified. :type copy:
bool
Returns: the input model with solvent added Return type: cms.Cms
- model (
-
schrodinger.application.desmond.gcmc_utils.
merge_ghost_solvent_file
(ifile, ofile)¶ Calls merge_ghost_solvent on a file and writes the result to a new file
Parameters: - ifile (
str
) – the input filename - ofile (
str
) – the output filename
- ifile (
-
schrodinger.application.desmond.gcmc_utils.
merge_ghost_solvent
(model, copy=False)¶ Merge the ghost solvent and solvent CTs. If no solvent CT exists, the ghost solvent will be turned into the solvent CT. This function will be left in place for 18-2 to allow users to migrate cms files with separate
ghost_solvent
CTs into the new singlesolvent
CT format, but note this will only produce usable output for systems without pseudoatoms.Parameters: - model (
cms.Cms
) – the Cms object whose CTs are to be merged - copy – whether or not to return a copy of the input structure.
Otherwise the input may be modified. :type copy:
bool
Returns: the same Cms object with its ghost solvent CT merged into its solvent CT :rtype:
cms.Cms
- model (
-
schrodinger.application.desmond.gcmc_utils.
remove_ghost_solvent_file
(ifile, ofile)¶ Calls remove_ghost_solvent on a file and writes the result to a new file
Parameters: - ifile (
str
) – the input filename - ofile (
str
) – the output filename
- ifile (
-
schrodinger.application.desmond.gcmc_utils.
remove_ghost_solvent
(model, copy_if_gcmc=False)¶ Remove ghost solvent from the full system CT and the component CTs such that afterward the
atom_total
will equal theactive_total
.Parameters: - model (
cms.Cms
) – the Cms object from which to remove ghost solvent atoms - copy_if_gcmc – whether or not to return a copy of the input structure
to avoid side effects (ie, the removal of ghost solvent molecules). If the input model does not contain ghost solvent, it is always returned uncopied. :type copy_if_gcmc:
bool
Returns: the same Cms object or a copy with its ghost solvent atoms removed Return type: cms.Cms
- model (
-
schrodinger.application.desmond.gcmc_utils.
tag_gcmc_ligand_file
(ifile, ofile)¶ 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
-
schrodinger.application.desmond.gcmc_utils.
tag_gcmc_ligand
(model)¶ Finds the atoms of the ‘ligand molecule(s)’ and sets the ‘i_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 the ‘i_gcmc_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 objectReturns: The modified input cms object Return type: cms.Cms
-
schrodinger.application.desmond.gcmc_utils.
tag_gcmc_near_ligand_file
(ifile, ofile, lig_file, cutoff_distance)¶ 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 – atoms within this distance of any ligand atom will
be tagged :type cutoff_distance: float
-
schrodinger.application.desmond.gcmc_utils.
tag_gcmc_near_ligand
(model, ligand_model, cutoff_distance)¶ Tags solute atoms in the model that are within the cutoff distance of any atom in the ligand model by setting the ‘i_gcmc_ligand’ atom property to 1.
Parameters: - model (
cms.Cms
) – the input cms model - ligand_model (
structure.Structure
) – the input ligand model - cutoff_distance – solute atoms within this distance of any ligand
atom will be tagged :type cutoff_distance: float
Returns: the modified input model Return type: cms.Cms
- model (
-
schrodinger.application.desmond.gcmc_utils.
ffio_delete_atoms
(ffio_ct, num_atoms)¶ 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 CT - num_atoms (
int
) – the number of atoms to delete
- ffio_ct (
-
schrodinger.application.desmond.gcmc_utils.
ffio_extend_ct
(ffio_ct, other_ffio_ct)¶ 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 CT - other_ffio_ct (
cms.ffiostructure.FFIOStructure
) – The ffio CT to extend the input CT with
- ffio_ct (
-
schrodinger.application.desmond.gcmc_utils.
equalize_number_waters
(struc_files)¶ Deletes the waters from the marked component CTs of the structure files until each has the same number of waters.
Note, this is currently tested in test_stage.py. That test should be moved here.
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.