schrodinger.application.matsci.buildcomplex2d module¶
Utilities for the 2D-to-3D *sdf
to *mae
file conversion for a
metal complex.
Copyright Schrodinger, LLC. All rights reserved.
- class schrodinger.application.matsci.buildcomplex2d.DummiesToHydrogens(st)¶
Bases:
object
Context manager to temporarily convert dummy atoms to hydrogens.
- __init__(st)¶
- class schrodinger.application.matsci.buildcomplex2d.RemoveMetalBonds(st)¶
Bases:
object
Context manager to temporarily remove bonds to the metal atom in a complex.
- __init__(st)¶
- exception schrodinger.application.matsci.buildcomplex2d.ComplexSdfToMaeException¶
Bases:
Exception
- class schrodinger.application.matsci.buildcomplex2d.ComplexSdfToMae(sdf_file, logger=None)¶
Bases:
object
Manage the 2D-to-3D
*sdf
to*mae
file conversion for a metal complex.- SD_PROP_PATTERN = re.compile('><(.*)>')¶
- SD_PROP_STARTER = 's_sd_'¶
- DUMMY_ATOMIC_NUMBER = -2¶
- BIND_PROP = 'b_user_metal_neighbor'¶
- HAPTIC_ATOM_PROP = 'b_user_haptic_atom'¶
- __init__(sdf_file, logger=None)¶
Create an instance.
- Parameters
sdf_file (str) – the 2D
*sdf
filelogger (logging.Logger or None) – output logger or None if there isn’t one
- static read_sdf(sdf_file)¶
Wrapper to read an
*sdf
file.- Parameters
sdf_file (str) – the
*sdf
file- Raises
ComplexSdfToMaeException – if there is an issue
- Return type
- Returns
the structure
- getCenterIdx()¶
Return the atom index that serves as the complex center, typically a metal atom.
- Raises
ComplexSdfToMaeException – if there is an issue
- Return type
int
- Returns
the atom index that serves as the complex center
- prepare()¶
Prepare the structure.
- addHydrogens(st)¶
Add hydrogens to the given structure.
- Parameters
st (
schrodinger.structure.Structure
) – the structure
- build()¶
Build the complex.
- Raises
ComplexSdfToMaeException – if there is an issue
- Return type
- Returns
the complex
- fixRingSpears(st)¶
Fix ring-spears.
- Parameters
st (
schrodinger.structure.Structure
) – the structure
- updateProperties(st)¶
Update properties on the given structure.
- Parameters
st (
schrodinger.structure.Structure
) – the structure
- run()¶
Run.
- Return type
- Returns
the structure
- write(mae_file=None)¶
Write.
- Parameters
mae_file (str) – the 3D
*mae
file- Return type
str
- Returns
the 3D
*mae
file
- sculptComplexBuild(sites=None, geometry=None, optimize=True)¶
Build the complex using sculpt complex.
- Parameters
sites (list or None) – contains atom index pair tuples, the first index is for the atom that binds to the metal and is negated for eta-coordinated ligands, the second index is for the atom that represents the metal positioning relative to the ligand and is 0 for eta-coordinated ligands, the order of sites in this list determines the coordination geometry of the complex, if None an arbitrarily ordered list of sites will be determined from the structure
geometry (str or None) – the VSEPR geometry from the buildcomplex geometry constants, if None uses the sculpt complex convention of using the last geometry for a given number of slots coming from the order in buildcomplex.IDEAL_SLOTS
optimize (bool) – whether to perform a standard geometry optimization on the final sculpted complex
- Raises
ComplexSdfToMaeException – if there is an issue
- Return type
- Returns
the complex
- buildComplexBuild()¶
Build the complex using build complex.
- Raises
ComplexSdfToMaeException – if there is an issue
- Return type
- Returns
the complex
- static type_cast_sdf_file(sdf_file)¶
Type cast the 2D
*sdf
file.- Parameters
sdf_file (str) – the 2D
*sdf
file- Raises
argparse.ArgumentTypeError – is there is an issue
- Return type
str
- Returns
the 2D
*sdf
file
- getAvailableGeometries(geometry=None)¶
Return the available geometries.
- Parameters
geometry (str or None) – the specific coordination geometry to use, if not specified all available geometries will be considered
- Raises
ComplexSdfToMaeException – if there is an issue
- Return type
list[str]
- Returns
contains available geometries
- get3DIsomers(geometry=None, out_rep=None, epsilon=2)¶
Return 3D isomers.
- Parameters
geometry (str or None) – the specific coordination geometry to use, if not specified all available geometries will be considered
out_rep (str or None) – if None then the conversion is to the opposite of the given representation, eta to centroid or centroid to eta, if a string then must be either module constant parserutils.CENTROID or parserutils.ETA in which case the conversion will always provide an output representation of the given type
epsilon (float) – the energy window in kcal/mol for binning isomers
- Raises
ComplexSdfToMaeException – if there is an issue
- Return type
- Returns
contains 3D isomers
- class schrodinger.application.matsci.buildcomplex2d.ComplexSdfToRxnWF(sdf_file, reference_rxnwf_file=None, handle_rotamers=True, logger=None)¶
Bases:
schrodinger.application.matsci.buildcomplex2d.ComplexSdfToMae
Manage the 2D-to-3D
*sdf
to*_rxnwf_mae
file conversion for a metal complex.- R_GROUP_SD_KEY_PATTERN = re.compile('R(\\d+)(.*)')¶
- SITE_ATOM_KEY = 'i_matsci_Reaction_Workflow_Enumeration_Atom'¶
- REPLACE_ATOM_SD_KEY = 'Replace Indices'¶
- SUPERPOSITION_ATOM_SD_KEY = 'Superimpose Indices'¶
- __init__(sdf_file, reference_rxnwf_file=None, handle_rotamers=True, logger=None)¶
Create an instance.
- Parameters
sdf_file (str) – the 2D
*sdf
filereference_rxnwf_file (str) – the reaction workflow file containing the reference structures, used for finding an optimal 3D geometry
handle_rotamers (bool) – whether to rotate mono-dentate haptic ligands containing superposition atoms such that they maximally overlap with the reference reaction workflow
logger (logging.Logger or None) – output logger or None if there isn’t one
- static parse_novel_sdf_file(sdf_file)¶
Parse the novel 2D
*sdf
file.- Parameters
sdf_file (str) – the novel 2D
*sdf
file- Returns
list, list, list, list
- Returns
(1) contains R-group file data as [R-group file, R-group index] pairs, (2) contains site data as [site “to” index, R-group index] pairs, (3) contains replace indicies, (4) contains superposition indices
- static type_cast_novel_sdf_file(sdf_file)¶
Type cast the novel 2D
*sdf
file.- Parameters
sdf_file (str) – the novel 2D
*sdf
file- Raises
argparse.ArgumentTypeError – is there is an issue
- Return type
str
- Returns
the novel 2D
*sdf
file
- updateProperties(st)¶
Update properties on the given structure.
- Parameters
st (
schrodinger.structure.Structure
) – the structure
- buildBestRotamer(nov_st)¶
Build the best rotamer:
- Parameters
nov_st (
schrodinger.structure.Structure
) – the novel structure- Raises
ComplexSdfToMaeException – if there is an issue
- run()¶
Run.
- Return type
- Returns
the structure
- write(rxnwf_file=None)¶
Write.
- Parameters
rxnwf_file (str) – the 3D
*_rxnwf.mae
file- Return type
str, list
- Returns
the 3D
*_rxnwf.mae
file, contains for each site a list of data[from_idx, to_idx, rgroup_idx]
- schrodinger.application.matsci.buildcomplex2d.convert_sdf_to_rxnwf(sdf_file, reference_rxnwf_file, handle_rotamers=True, output_rxnwf_file_name=None, logger=None)¶
Convert the given single structure 2D
*sdf
file to a 3D*_rxnwf.mae
file.- Parameters
sdf_file (str) – the
*sdf
filereference_rxnwf_file (str) – the reaction workflow file containing the reference structures, used for finding an optimal 3D geometry
handle_rotamers (bool) – whether to rotate mono-dentate haptic ligands containing superposition atoms such that they maximally overlap with the reference reaction workflow
output_rxnwf_file_name (str) – the output reaction workflow file name
logger (logging.Logger or None) – output logger or None if there isn’t one
- Return type
str, list, list
- Returns
(1) the 3D
*_rxnwf.mae
file, (2) contains R-group file data as [R-group file, R-group index] pairs, (3) contains for each site a list of data [from_idx, to_idx, rgroup_idx]
- schrodinger.application.matsci.buildcomplex2d.get_3d_isomers(sdf_file, geometry=None, out_rep=None, epsilon=2, logger=None)¶
Return 3D isomers for the given 2D
*sdf
file of a transition metal complex.- Parameters
sdf_file (str) – the
*sdf
filegeometry (str or None) – the specific coordination geometry to use, if not specified all available geometries will be considered
out_rep (str or None) – if None then the conversion is to the opposite of the given representation, eta to centroid or centroid to eta, if a string then must be either module constant parserutils.CENTROID or parserutils.ETA in which case the conversion will always provide an output representation of the given type
epsilon (float) – the energy window in kcal/mol for binning isomers
logger (logging.Logger or None) – output logger or None if there isn’t one
- Return type
- Returns
contains 3D isomers