schrodinger.application.desmond.fep_scholar_util module¶
This file contains common utility methods and classes used in several FEP scripts.
Copyright Schrodinger, LLC. All rights reserved.
-
schrodinger.application.desmond.fep_scholar_util.
DECREMENT
(x)¶
-
class
schrodinger.application.desmond.fep_scholar_util.
FEPScholarMapper
(st1, st2, dist=0.4, match1=None, match2=None, core_hop=False)¶ Bases:
object
This is a mapper class used by FEP Scholar GUI so that we don’t need to use Canvas MCS for matching molecule atoms.
-
clear_atom_props
(st)¶
-
createMap
()¶ This function should be called when this class is initialized. It determines atom mapping between two structures. Mapping information is stored as various properties in structure objects.
-
del_from_carat
(idx)¶
-
getCoreRmsd
()¶ This function calculates RMSD for core atoms in two ligands.
Returns: core RMSD Return type: float
-
getHotAtoms
()¶ This function returns lists of ‘hot’ atoms for two ligands.
Returns: tuple that contains lists of ‘hot’ atoms. Return type: tuple
-
getMatches
()¶ This function returns tuple that contains lists of ‘core’ atom indices for both structures. For the second ligand list of atom matches is reordered to reference the list of matches for the first ligand.
Returns: tuple that contains two lists of core atoms Return type: tuple
-
getMutations
()¶ This function finds mutated atoms for two ligand structures. Atoms in two ligands are defined as ‘mutated’ if they are defined as ‘core’ atoms, but don’t have same atomic numbers.
Returns: tuple that contains lists of ‘mutated’ atoms for two ligands Return type: tuple
-
getStructures
()¶ This function returns
structure.Structure
objects for two ligands. Note that these structures are different(!) from the ones used to initialize this class. There contain special fep mapping properties.Returns: modified structures for two ligands Return type: tuple
-
get_atom_key
(atom)¶
-
get_carat_map
(st)¶
-
get_coords_dict
(st)¶ This function creates so-called coordinates dictionary for each atom in a structure. Here key is the text string based on atom coordinates and value is atom’s MetaAtom object.
Returns: ‘coordinates dictionary’ Return type: dict
-
get_core_map
(st_new)¶
-
get_dist
(xyz1, xyz2)¶
-
get_fep_mapping
(st)¶
-
match_by_cartesian_coordinates
(st_new)¶
-
match_by_distance
(st_new, distance)¶
-
match_core_hydrogens
(st_new)¶
-
remove_unconn_core_atoms
(st_new)¶
-
set_match_atom
(atom, matched_atom_index)¶
-
-
class
schrodinger.application.desmond.fep_scholar_util.
FEPStructureObject
(parent)¶ Bases:
PyQt5.QtCore.QObject
This class holds all information about each ligand. It also contains drawing objects.
-
clear
()¶
-
setStructure
(st, template_chmmol=None, mapper=None)¶ Set structure and generate coordinates. If template molecule is provided, coordinates will be generated to align matching mcs atoms.
Parameters: - st (
structure.Structure
) – molecule structure - template_chmmol (
canvas.ChmMol
) – template molecule - mapper – FEP mapper from which MCS matches are obtained.
- st (
-
sizeHint
()¶ Provide size hint for structure pictures.
See Qt documentation for an explanation of arguments and return value.
-
-
class
schrodinger.application.desmond.fep_scholar_util.
MappingAnnotator
(matches, map_to=None)¶ Bases:
schrodinger.infra._canvas2d.ChemViewAnnotator
This annotator allows to show atom numbers for a selected subset of atoms. In addition user can specify ‘map to’ list of atom numbers that will be used instead to as atom labels.
-
annotate
(view, dm)¶ Add atom number to each atom
Parameters: - view (Chemview) – the View this item goes in
- dm (ChmDrawMol) – object that contains the list of atom and bond graphics
-
-
class
schrodinger.application.desmond.fep_scholar_util.
MetaAtom
(atom)¶ Bases:
object
This is the meta atom class that mostly provides convinience functions. It is used by the scholar mapper functions.
-
atom_type
¶ Return macromodel atom type.
-
connected_atoms
¶ Return a list of atoms that are bonded to this atom.
-
index
¶
-
xyz
¶
-
-
class
schrodinger.application.desmond.fep_scholar_util.
ScholarStructureItem
(rect=None)¶ Bases:
schrodinger.ui.qt.structure2d.structure_item
This class adds new function to the base structure_item class that allows to show some atoms and bonds with highlighting.
-
generatePictureHighlight
(atoms, bonds, color, gen_coord)¶ Generates a QPicture of the structure. This should be called after setting the structure and the accompaning annotators.
Parameters: - atoms (list) – list atom indices that should be highlighted.
- bonds (list) – list of bond indices that should be highlighted
- color (
QtGui.QColor
) – highlighting color - gen_coord (bool) – argument indicating whether molecule coordinates should be generated.
-
-
schrodinger.application.desmond.fep_scholar_util.
generate_core_pic
(mapper, ligand1, ligand2)¶ Highlight core atoms and bonds in ligand structures.
Parameters: - mapper (
fep_scholar_util.FEPScholarMapper
) – FEP scholar mapper object - ligand1 (
fep_scholar_util.FEPStructureObject
) – first ligand FEP structure object - ligand2 (
fep_scholar_util.FEPStructureObject
) – second ligand FEP structure object
- mapper (
-
schrodinger.application.desmond.fep_scholar_util.
generate_default_pic
(ligand1, ligand2)¶ Create default picture of two ligands, which only shows ligand structures and no mapping.
Parameters: - ligand1 (
fep_scholar_util.FEPStructureObject
) – first ligand FEP structure object - ligand2 (
fep_scholar_util.FEPStructureObject
) – second ligand FEP structure object
- ligand1 (
-
schrodinger.application.desmond.fep_scholar_util.
generate_hot_atoms_pic
(mapper, ligand1, ligand2)¶ Show ‘hot’ atoms on ligand structures.
Parameters: - mapper (
fep_scholar_util.FEPScholarMapper
) – FEP scholar mapper object - ligand1 (
fep_scholar_util.FEPStructureObject
) – first ligand FEP structure object - ligand2 (
fep_scholar_util.FEPStructureObject
) – second ligand FEP structure object
- mapper (
-
schrodinger.application.desmond.fep_scholar_util.
generate_mapping_pic
(mapper, ligand1, ligand2)¶ Create atom mapping by displaying atom indices on ligand structures. For the second ligand we display corresponding atom indices from the first ligand.
Parameters: - mapper (
fep_scholar_util.FEPScholarMapper
) – FEP scholar mapper object - ligand1 (
fep_scholar_util.FEPStructureObject
) – first ligand FEP structure object - ligand2 (
fep_scholar_util.FEPStructureObject
) – second ligand FEP structure object
- mapper (
-
schrodinger.application.desmond.fep_scholar_util.
generate_mutation_pic
(mapper, ligand1, ligand2)¶ Create mutations on ligand structures.
Parameters: - mapper (
fep_scholar_util.FEPScholarMapper
) – FEP scholar mapper object - ligand1 (
fep_scholar_util.FEPStructureObject
) – first ligand FEP structure object - ligand2 (
fep_scholar_util.FEPStructureObject
) – second ligand FEP structure object
- mapper (
-
schrodinger.application.desmond.fep_scholar_util.
generate_scripts
(cd_params, jobname, cmd)¶ Write the command line for submitting the job
-
schrodinger.application.desmond.fep_scholar_util.
get_chmmol_bonds_from_atoms
(chmmol, atoms)¶ This function returns a list of bonds that connect atoms in a given list.
Parameters: - chmmol (
canvas.ChmMol
) – molecule structure - atoms (list) – list of atom indices
- chmmol (
-
schrodinger.application.desmond.fep_scholar_util.
get_mutation_atoms_and_bonds
(cmol, match, mut_atoms)¶ This function determines lists of atoms and bonds that should be highlighted to show mutations.
Parameters: - cmol (
canvas2d.ChmMol
) – Canvas ChmMol - match (list) – list of core atoms
- mut_atoms (list) – list of ‘mutated’ atoms
Returns: tuple that contains list of atoms and list of bonds
Return type: tuple
- cmol (
-
schrodinger.application.desmond.fep_scholar_util.
make_fep_cmd
(cd_params, jobname, struct_fname, opt=[])¶ Generates an FEP command list based on the specified parameters.
Parameters: Returns: a command list for launching the job
Return type: list