schrodinger.application.matsci.buildcomplex module¶
This module assists in building organometallic complexes. Given one or more ligands, these ligands will be arranged around a central atom.
Copyright Schrodinger, LLC. All rights reserved.
- schrodinger.application.matsci.buildcomplex.MONODENTATE = 'Monodentate'¶
Name for ligands that have a single coordination site
- schrodinger.application.matsci.buildcomplex.BIDENTATE = 'Bidentate'¶
Name for ligands that have two coordination sites
- schrodinger.application.matsci.buildcomplex.OCTAHEDRAL = 'Octahedral'¶
VESPR geometry with 6 coordination sites around a central atom
- schrodinger.application.matsci.buildcomplex.TRIGONAL_BIPYRAMIDAL = 'Trigonal bipyramidal'¶
VESPR geometry with 5 coordination sites around a central atom
- schrodinger.application.matsci.buildcomplex.TETRAHEDRAL = 'Tetrahedral'¶
VESPR geometry with 4 coordination sites around a central atom
- schrodinger.application.matsci.buildcomplex.SQUARE_PLANAR = 'Square planar'¶
VESPR geometry with 4 coordination sites around a central atom
- schrodinger.application.matsci.buildcomplex.TRIGONAL_PLANAR = 'Trigonal planar'¶
VESPR geometry with 3 coordination sites around a central atom
- schrodinger.application.matsci.buildcomplex.LINEAR = 'Linear'¶
VESPR geometry with 2 coordination sites around a central atom
- schrodinger.application.matsci.buildcomplex.PENTAGONAL_BIPYRAMIDAL = 'Pentagonal bipyramidal'¶
VESPR geometry with 7 coordination sites around a central atom
- schrodinger.application.matsci.buildcomplex.SQUARE_ANTIPRISMATIC = 'Square antiprismatic'¶
VESPR geometry with 8 coordination sites around a central atom
- schrodinger.application.matsci.buildcomplex.TRICAPPED_TRIGONAL_PRISMATIC = 'Tricapped trigonal prismatic'¶
VESPR geometry with 9 coordination sites around a central atom
- schrodinger.application.matsci.buildcomplex.SQUARE_PYRAMIDAL = 'Square pyramidal'¶
VESPR geometry with 5 coordination sites around a central atom
- schrodinger.application.matsci.buildcomplex.SUPPORTED_GEOMETRIES = ['Octahedral', 'Trigonal bipyramidal', 'Square planar', 'Tetrahedral', 'Trigonal planar', 'Linear', 'Pentagonal bipyramidal', 'Square antiprismatic', 'Tricapped trigonal prismatic', 'Square pyramidal']¶
VESPR geometries that can be built by this module
- schrodinger.application.matsci.buildcomplex.CMDLINE_TO_GEOMETRY = {'linear': 'Linear', 'octahedral': 'Octahedral', 'pentagonal_bipyramidal': 'Pentagonal bipyramidal', 'square_antiprismatic': 'Square antiprismatic', 'square_planar': 'Square planar', 'square_pyramidal': 'Square pyramidal', 'tetrahedral': 'Tetrahedral', 'tricapped_trigonal_prismatic': 'Tricapped trigonal prismatic', 'trigonal_bipyramidal': 'Trigonal bipyramidal', 'trigonal_planar': 'Trigonal planar'}¶
mapping from cmd-line name to full name of geometry
- schrodinger.application.matsci.buildcomplex.GEOMETRY_TO_CMDLINE = {'Linear': 'linear', 'Octahedral': 'octahedral', 'Pentagonal bipyramidal': 'pentagonal_bipyramidal', 'Square antiprismatic': 'square_antiprismatic', 'Square planar': 'square_planar', 'Square pyramidal': 'square_pyramidal', 'Tetrahedral': 'tetrahedral', 'Tricapped trigonal prismatic': 'tricapped_trigonal_prismatic', 'Trigonal bipyramidal': 'trigonal_bipyramidal', 'Trigonal planar': 'trigonal_planar'}¶
mapping from full name of geometry to cmd-line name
- schrodinger.application.matsci.buildcomplex.CMDLINE_GEOMETRIES = ['octahedral', 'trigonal_bipyramidal', 'square_planar', 'tetrahedral', 'trigonal_planar', 'linear', 'pentagonal_bipyramidal', 'square_antiprismatic', 'tricapped_trigonal_prismatic', 'square_pyramidal']¶
list of cmd-line names for geometries
- schrodinger.application.matsci.buildcomplex.FACIAL = 'facial'¶
Octahedral complex with identical atoms on the face of the octahedron
- schrodinger.application.matsci.buildcomplex.MERIDIONAL = 'meridional'¶
Octahedral complex with identical atoms on the meridion of the octahedron
- schrodinger.application.matsci.buildcomplex.NO_ISOMER = 'none'¶
No specific isomer
- schrodinger.application.matsci.buildcomplex.CIS = 'cis'¶
Square planar complex with identical atoms in adjacent sites
- schrodinger.application.matsci.buildcomplex.TRANS = 'trans'¶
Square planar complex with identical atoms in opposite sites
- schrodinger.application.matsci.buildcomplex.OCTAHEDRAL_LOCATIONS = [(2.0, 0.0, 0.0), (0.0, 2.0, 0.0), (0.0, 0.0, 2.0), (0.0, -2.0, 0.0), (-2.0, 0.0, 0.0), (0.0, 0.0, -2.0)]¶
XYZ coordinates of the octahedral coordination sites
- schrodinger.application.matsci.buildcomplex.TRIGONAL_BIPYRAMIDAL_LOCATIONS = [(0.0, 2.0, 0.0), (0.0, -2.0, 0.0), (2.0, 0.0, 0.0), (-1.0, 0.0, 1.73205), (-1.0, 0.0, -1.73205)]¶
XYZ coordinates of the trigonal pyramid coordination sites
- schrodinger.application.matsci.buildcomplex.SQUARE_PLANAR_LOCATIONS = [(2.0, 0.0, 0.0), (0.0, 2.0, 0.0), (0.0, -2.0, 0.0), (-2.0, 0.0, 0.0)]¶
XYZ coordinates of the square planar coordination sites
- schrodinger.application.matsci.buildcomplex.TETRAHEDRAL_LOCATIONS = [(0.0, 2.0, 0.0), (1.88562, -0.66667, 0.0), (-0.94281, -0.66667, -1.63299), (-0.94281, -0.66667, 1.63299)]¶
XYZ coordinates of the tetrahedral coordination sites
- schrodinger.application.matsci.buildcomplex.TRIGONAL_PLANAR_LOCATIONS = [(2.0, 0.0, 0.0), (-1.0, 1.73205, 0.0), (-1.0, -1.73205, 0.0)]¶
XYZ coordinates of the trigonal planar coordination sites
- schrodinger.application.matsci.buildcomplex.LINEAR_LOCATIONS = [(2.0, 0.0, 0.0), (-2.0, 0.0, 0.0)]¶
XYZ coordinates of the linear coordination sites
- schrodinger.application.matsci.buildcomplex.PENTAGONAL_BIPYRAMIDAL_LOCATIONS = [(0.0, 0.0, 2.0), (2.0, 0.0, 0.0), (0.6180339887498949, 1.902113032590307, 0.0), (-1.6180339887498947, 1.1755705045849465, 0.0), (-1.6180339887498947, -1.1755705045849465, 0.0), (0.6180339887498949, -1.902113032590307, 0.0), (0.0, 0.0, -2.0)]¶
XYZ coordinates of the pentagonal bipyramidal sites
- schrodinger.application.matsci.buildcomplex.SQUARE_ANTIPRISMATIC_LOCATIONS = [(1.696096192312852, 0.0, 1.0598385284664098), (1.2496025204274779, 1.2496025204274779, -0.9364758843038024), (0.0, 1.696096192312852, 1.0598385284664098), (-1.2496025204274779, 1.2496025204274779, -0.9364758843038024), (-1.696096192312852, 0.0, 1.0598385284664098), (-1.2496025204274779, -1.2496025204274779, -0.9364758843038024), (0.0, -1.696096192312852, 1.0598385284664098), (1.2496025204274779, -1.2496025204274779, -0.9364758843038024)]¶
XYZ coordinates of the square antiprismatic sites
- schrodinger.application.matsci.buildcomplex.TRICAPPED_TRIGONAL_PRISMATIC_LOCATIONS = [(1.4142135623730951, 0.0, -1.414213562373095), (0.0, 1.4142135623730951, -1.414213562373095), (-1.4142135623730951, 0.0, -1.414213562373095), (0.0, -1.4142135623730951, -1.414213562373095), (1.4142135623730951, -1.0, 0.9999999999999998), (1.4142135623730951, 1.0, 0.9999999999999998), (-1.4142135623730951, 1.0, 0.9999999999999998), (-1.4142135623730951, -1.0, 0.9999999999999998), (0.0, 0.0, 2.0)]¶
XYZ coordinates of the tricapped trigonal prismatic sites
- schrodinger.application.matsci.buildcomplex.SQUARE_PYRAMIDAL_LOCATIONS = [(2.0, 0.0, 0.0), (0.0, 2.0, 0.0), (0.0, -2.0, 0.0), (-2.0, 0.0, 0.0), (0.0, 0.0, 2.0)]¶
XYZ coordinates of the square pyramidal sites
- class schrodinger.application.matsci.buildcomplex.LigandInfo(family, abbreviation, charge, name, coordination, formula)¶
Bases:
tuple
- __contains__(key, /)¶
Return key in self.
- __len__()¶
Return len(self).
- abbreviation¶
Alias for field number 1
- charge¶
Alias for field number 2
- coordination¶
Alias for field number 4
- count(value, /)¶
Return number of occurrences of value.
- family¶
Alias for field number 0
- formula¶
Alias for field number 5
- index(value, start=0, stop=9223372036854775807, /)¶
Return first index of value.
Raises ValueError if the value is not present.
- name¶
Alias for field number 3
- class schrodinger.application.matsci.buildcomplex.MinimizeInfo(pos_frozen_idxs)¶
Bases:
tuple
- __contains__(key, /)¶
Return key in self.
- __len__()¶
Return len(self).
- count(value, /)¶
Return number of occurrences of value.
- index(value, start=0, stop=9223372036854775807, /)¶
Return first index of value.
Raises ValueError if the value is not present.
- pos_frozen_idxs¶
Alias for field number 0
- schrodinger.application.matsci.buildcomplex.get_ligands_info()¶
Get ligands info from csv file
- Returns
Dict with key as smiles string of ligand and values as
LIGANDINFO
- Return type
Dict
- schrodinger.application.matsci.buildcomplex.get_ligand_name(struct)¶
Get abbreviated name of structures from the ligand list
- Parameters
struct (schrodinger.structure.Structure) – structure of which abbreviated name to get
- Returns
Get ligand name based on abbreviated name or full name or chemical formula
- Return type
str
- schrodinger.application.matsci.buildcomplex.find_lone_hydrogen(struct, heavy_index)¶
Find the lone hydrogen attached to an atom
- Parameters
struct (schrodinger.structure.Structure) – The structure in which the atoms are present
heavy_index (int) – The index of the heavy atom to search for a single hydrogen
- Return type
int or None
- Returns
The index of the lone attached hydrogen atom or None if 0 or more than 1 hydrogen is attached to the heavy atom
- schrodinger.application.matsci.buildcomplex.get_sentinel_sites(sentinel)¶
Find the complex sites on the sentinel ligand using the Template Rx markers
- Parameters
sentinel (
schrodinger.structure.Structure
) – The sentinel ligand - this should come from a Template created with the Complex builder or this panel, and have markers indicating the complex sites.- Return type
list
- Returns
A list of tuples. Each tuple is (X, Y), where X is the ligand atom index of the coordinating atom and Y is the ligand atom index of the atom to remove upon coordination. Y=0 if no atom is to be removed. One tuple for each coordination site is given.
- schrodinger.application.matsci.buildcomplex.get_pretty_geom_str(geom)¶
Return geometry string in pretty format.
- Parameters
geom (str) – a geometry from SUPPORTED_GEOMETRIES in cli format
- Return type
str
- Returns
a geometry from SUPPORTED_GEOMETRIES in pretty format
- schrodinger.application.matsci.buildcomplex.get_cli_geom_str(geom)¶
Return geometry string in cli format.
- Parameters
geom (str) – a geometry from SUPPORTED_GEOMETRIES in pretty format
- Return type
str
- Returns
a geometry from SUPPORTED_GEOMETRIES in cli format
- schrodinger.application.matsci.buildcomplex.minimize_complexes(structs, forcefield=14, **kwargs)¶
Minimize the given structures using the new MMFFLD method of determining parameters for metal complexes.
Additional keyword arguments are passed to the Minimizer class constructor
- Parameters
structs (list or dict of
schrodinger.structure.Structure
) – The structures to minimize, use a dict if any structures have structure specific minimize settings, for example frozen atoms, etc., in this case values should be either None (structure has no specific settings) or MinimizeInfoffld_version (integer) – The force field to use. Should be a module constant from the minimize module.
- Raises
ValueError – Typically means atom typing error or valence violations
mm.MmException – Due to overlapping atoms
- schrodinger.application.matsci.buildcomplex.minimize_complex(struct, forcefield=14, **kwargs)¶
Minimize the given structure using the new MMFFLD method of determining parameters for metal complexes.
Additional keyword arguments are passed to the Minimizer class constructor
- Parameters
struct (
schrodinger.structure.Structure
) – The structure to minimizeffld_version (integer) – The force field to use. Should be a module constant from the minimize module.
- Raises
ValueError – Typically means atom typing error or valence violations
mm.MmException – Due to overlapping atoms
- schrodinger.application.matsci.buildcomplex.fix_metal_bond_orders(struct, index, monoxide=3)¶
Fix all the bonds to atom index to be either single or dative depending on whether the other atom has a full valence without this bond or not. Full valence without this bond = dative bond, otherwise bond order = number of open valences. Formal charges are also set to 0 for the metal atom and bonded neighbors.
Note - no bonds are added or removed by this function, only bond orders are changed.
- Parameters
struct (
schrodinger.structure.Structure
) – The structure to operate on - bonds are modified on this structure directly, not a copyindex (int) – The atom index of the metal atom with bonds to adjust
monoxide (str) – Whether carbon monoxide-like molecules should be represented by a dative bond to metal and a triple CO bond (
TRIPLE_CO_BOND
) or by a double bond to the metal and a double CO bond (DOUBLE_CO_BOND
). Use TRIPLE_CO_BOND for standard complex building applications and DOUBLE_CO_BOND for SMILES-based ML applications.
- schrodinger.application.matsci.buildcomplex.fix_all_metal_bond_orders(struct, monoxide=3)¶
Set the order of bonds containing metals to zero.
- Parameters
struct (schrodinger.structure.Structure) – input structure containing metal bonds
monoxide (str) – Whether carbon monoxide-like molecules should be represented by a dative bond to metal and a triple CO bond (
TRIPLE_CO_BOND
) or by a double bond to the metal and a double CO bond (DOUBLE_CO_BOND
). Use TRIPLE_CO_BOND for standard complex building applications and DOUBLE_CO_BOND for SMILES-based ML applications.
- schrodinger.application.matsci.buildcomplex.transmute_atom(atom, element, color=None)¶
Transmute atom from its current element to a new element. The new name will be element + index (ex. H17), and the new color if not supplied will be the Maestro default (or purple if no Maestro default).
- Parameters
atom (
schrodinger.structure._StructureAtom
) – The atom object to transmute to a new elementelement (str) – The atomic symbol of the new element
color (str) – The new color of the atom in a format accepted by the _StructAtom.color property. The default is to use Maestro’s default color for the new element, or purple if the default color is not defined.
- Raises
ValueError – if element is not a recognized atomic symbol
- schrodinger.application.matsci.buildcomplex.find_atoms_to_remove(struct, keep_atom, root_atom)¶
Return a list of atoms bound to root atom (and recursively all atoms bound to those atoms, ad infinitum). keep_atom and all atoms recursively bound to it will not be added to the list.
If keep_atom and root_atom are part of the same ring system, root_atom will be the only atom returned in the list.
For structure A-B-C-D-E, if keep_atom=B and root_atom=C, the returned list will be [C, D, E].
- Parameters
struct (schrodinger.structure.Structure) – The structure to use
keep_atom (int) – The index of the atom to keep
root_atom (int) – The index of the first atom to remove. All neighbors of this atom that are not keep_atom will be added to the list.
- Return type
list
- Returns
A list of all atoms recursively bound to root atom. keep_atom and all atoms bound to it are excluded from the list.
- schrodinger.application.matsci.buildcomplex.convert_old_marker_props_to_new(struct)¶
Some template strutures may still use old-style properties to mark Rx atoms. This function converts those properties to new-style properties and removes the old ones.
- Parameters
struct (
schrodinger.structure.Structure
) – The structure with properties to read and modify
- schrodinger.application.matsci.buildcomplex.get_marker_atom_indexes_from_structure(struct)¶
Get the indexes of atoms marked as Rx atoms
- Parameters
struct (
schrodinger.structure.Structure
) – The structure with the Rx atoms- Return type
(dict, int)
- Returns
dict keys are the int value of x in Rx, values are lists of atom indexes set to that Rx value (atom indexes are 1-based). The int return value is the highest value of x in the keys of the dictionary.
- schrodinger.application.matsci.buildcomplex.mark_eta_positions(struct, rx_atoms)¶
Add a structure property that gives the index of each eta-coordination marker
- Parameters
struct (
schrodinger.structure.Structure
) – The structure with the Rx atomsrx_atoms (dict) – Keys are x value and values are lists of atoms denoted with that Rx marker
- schrodinger.application.matsci.buildcomplex.get_eta_marker_indexes(struct)¶
Get a set of all atom indexes for eta-coordination markers
- Parameters
struct (
schrodinger.structure.Structure
) – The structure with the Rx atoms- Return type
set
- Returns
Each item of the set is the atom index of a marker for an eta-coordination site
- schrodinger.application.matsci.buildcomplex.clear_marker_properties(struct)¶
Clear any marker properties that exist on the structure
- Parameters
struct (
schrodinger.structure.Structure
) – The structure with the marker properties to clear
- schrodinger.application.matsci.buildcomplex.set_marker_properties(struct, rx_atoms, clear=True)¶
Set the structure properties that store the atoms
- Parameters
struct (
schrodinger.structure.Structure
) – The structure with the Rx atomsrx_atoms (dict) – keys are the int value of x in Rx, values are lists of atom indexes set to that Rx value (atom indexes are 1-based)
clear (bool) – Clear any existing marker properties before setting new ones
- schrodinger.application.matsci.buildcomplex.lock_marker_atom_in_place(mizer, struct, index)¶
Lock an atom in place before minimization. Freezes the current bond, angle and torsion of the given atom. If the atom is not bonded to anything, no restraints are added. If multiple bonds, angles or torsions are available to lock, only one of each is chosen.
- Parameters
mizer (structutils.minimize.Minimizer) – The minimizer
struct (structure.Structure) – The structure to be minimized
index (int) – The index of the atom to lock in place
- exception schrodinger.application.matsci.buildcomplex.EtaFFAssignmentError¶
Bases:
Exception
Raised when a FF assignment error occurs
- __init__(*args, **kwargs)¶
- args¶
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- class schrodinger.application.matsci.buildcomplex.ConvertBondsToDative(struct, atoms=None)¶
Bases:
object
Context manager to temporarily convert bonds with order > 0 to dative bonds.
- __init__(struct, atoms=None)¶
Create a ConvertBondsToDative context manager
- Parameters
struct (structure.Structure) – The structure containing the bonds
atoms (iterable) – The collection of atoms whose bonds should be converted. If not given, all atoms will be used
- class schrodinger.application.matsci.buildcomplex.ConvertZOBToSingle(struct)¶
Bases:
object
Context manager to temporarily convert zero-order bonds (true ZOBS or dative) to single bonds. Upon exit all former zero-order bonds will be dative. This is intentional.
- __init__(struct)¶
Create a ConvertZOBToSingle context manager
- Parameters
struct (structure.Structure) – The structure with bonds to convert
- class schrodinger.application.matsci.buildcomplex.Ligand(struct, sites=None, slots=None)¶
Bases:
object
Stores information about a ligand structure
- __init__(struct, sites=None, slots=None)¶
Create a Ligand object
- Parameters
struct (
schrodinger.structure.Structure
) – The ligand structuresites (list of tuple) – Each item of the list is a (X, Y) tuple. X is the index of the atom that will attach to the central metal atom in the complex, and Y is the index of the atom that should be removed to make the attachment. The X-Metal bond will be made along the X-Y bond vector. If Y is 0, the bond will be assumed to be a dative bond, and the X-Metal bond will be formed along an angle that is chosen to minimize sterics. If X is negative, the site is an eta-coordination site.
slots (list of int) – The coordination slots this ligand will occupy. The coordination slot is the index into the GEOMETRY_LOCATIONS array that specifies the xyz coordinates for this ligand coordination. If not supplied, the slots will be supplied based on the isomer of the complex.
- minimizeEtaPosition()¶
For bidentate eta ligands, orient the eta plane(s) to be face-on to roughly where the metal atom will be
Eta sites are marked by two dummy atoms X and Y. X is located at the centroid of all eta atoms in the plane of the eta atoms. Y is located at roughly the site of the metal atom.
- class schrodinger.application.matsci.buildcomplex.ComplexBuilder(metal='Ir', geometry='Octahedral', isomer='facial', homoleptic=True, dentation='Bidentate')¶
Bases:
object
A class used to build an organometallic complex
- __init__(metal='Ir', geometry='Octahedral', isomer='facial', homoleptic=True, dentation='Bidentate')¶
Create a ComplexBuilder instance
- Parameters
metal (str) – The atomic symbol of the central atom
geometry (str) – VESPR geometry of the complex. Should be a module constant: OCTAHEDRAL, TETRAHEDRAL, SQUARE_PLANAR
isomer (str or None) – For octahedral complexes, can be module constants FACIAL, MERIDIONAL, or NO_ISOMER. For square planar complexes, can be module constants CIS, TRANS or NO_ISOMER. It is ignored for tetrahedral. None may be used instead of NO_ISOMER.
homoleptic (bool) – If True, the complex is homoleptic and only one ligand should be supplied. If False, the complex is heteroleptic and every ligand must be supplied. Homoleptic = all ligands are identical, heteroleptic = ligands may or may not be identical.
dentation (int) – Module-level constant describing the dentation type of the ligand - either MONODENTATE or BIDENTATE. Only used to determine the coordination slot order (the order coordination sites are filled) for isomers.
- resetSlots(dentation='Bidentate')¶
Reset the slot order back to ideal slot order
- Parameters
dentation (int) – Module-level constant describing the dentation type of the ligand - either MONODENTATE or BIDENTATE
- setSlotOrder(slot_order)¶
Set the order that coordination sites should be used. This should be a list of indexes into the slot_order property. Ligands will be attached at these coordination sites in the order they are added.
- Parameters
slot_order (list of int) – List of indexes that specifies the order of coordination sites to use.
- Raises
IndexError – If the list is not the correct length (6 for octahedral, 4 for tetrahedral/square_planar). An example for square_planar might be [0, 2, 1, 3].
ValueError – If the list contains duplicated indexes or indexes outside the allow range of 0 to len(list)-1
- getNumUsedCoordSites()¶
Get the current number of coordination sites required for all copies of all ligands set so far.
- Return type
int
- Returns
The total number of sites required for all currently set ligands. Accounts for the number of copies requested and mono/bi-dentation of each ligand.
- addMonodentateLigand(struct, site, slot=None, copies=1)¶
Add a monodentate ligand for the complex.
- Parameters
struct (
schrodinger.structure.Structure
) – The structure of the ligandsite (tuple) – An (X, Y) tuple. X is the index of the atom that will attach to the central metal atom in the complex, and Y is the index of the atom that should be removed to make the attachment. The X-Metal bond will be made along the X-Y bond vector. If Y is 0, the bond will be assumed to be a dative bond, and the X-Metal bond will be formed along an angle that is chosen to minimize sterics. If X is negative, the site is an eta-coordination site.
slot (int) – The coordination slot this ligand will occupy. The coordination slot is the index into the GEOMETRY_LOCATIONS array that specifies the xyz coordinates for this ligand coordination.
copies (int) – The number of copies of this ligand. It is a ValueError to specify slot & copies > 1.
- addBidentateLigand(struct, sites, slots=None, copies=1)¶
Add a bidentate ligand for the complex.
- Parameters
struct (
schrodinger.structure.Structure
) – The structure of the ligandsites (list of tuple) – Each item of the list is a (X, Y) tuple. X is the index of the atom that will attach to the central metal atom in the complex, and Y is the index of the atom that should be removed to make the attachment. The X-Metal bond will be made along the X-Y bond vector. If Y is 0, the bond will be assumed to be a dative bond, and the X-Metal bond will be formed along an angle that is chosen to minimize sterics. If X is negative, the site is an eta-coordination site.
slots (list of int) – The coordination slots this ligand will occupy. The coordination slot is the index into the GEOMETRY_LOCATIONS array that specifies the xyz coordinates for this ligand coordination.
copies (int) – The number of copies of this ligand. It is a ValueError to specify slot & copies > 1.
- clearLigands()¶
Remove all added ligands
- createComplex(force=False)¶
Create the complex based on the defined ligands
- Parameters
force (bool) – If true, create a complex even if all slots are not filled. If False (default), raise IndexError if all slots are not filled.
- Raises
IndexError – If not all sites are filled and force is not True
IndexError – Too many ligands specified for available sites
- exception schrodinger.application.matsci.buildcomplex.NoMetalError¶
Bases:
Exception
Emitted when a metal is not found when one is expected
- __init__(*args, **kwargs)¶
- args¶
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- class schrodinger.application.matsci.buildcomplex.EtaFindingMixin¶
Bases:
object
A mixin with a method for finding eta ligands in a metal complex
- findEtaGroups(dummy_style=True)¶
Find each Eta group
We define an Eta group as 2 or more atoms that are bound together and also bound to a metal atom
- Parameters
dummy_style (bool) – Whether to also find eta ligands that are bound by bonding all the ligand atoms to a dummy and then the dummy to the metal. If False, only those ligands that have all eta atoms bound directly to the metal will be found.
- Note
The function assumes that the self.metals property is set to a list of metal atoms and it creates the self.eta_groups and self_all_eta_atoms properties
- class schrodinger.application.matsci.buildcomplex.ComplexSplitter(struct, asl='metals', metals=None)¶
Bases:
schrodinger.application.matsci.buildcomplex.EtaFindingMixin
Splits a metal complex into a set of ligand structures that bind to the metal
- findEtaGroups(dummy_style=True)¶
Find each Eta group
We define an Eta group as 2 or more atoms that are bound together and also bound to a metal atom
- Parameters
dummy_style (bool) – Whether to also find eta ligands that are bound by bonding all the ligand atoms to a dummy and then the dummy to the metal. If False, only those ligands that have all eta atoms bound directly to the metal will be found.
- Note
The function assumes that the self.metals property is set to a list of metal atoms and it creates the self.eta_groups and self_all_eta_atoms properties
- METAL_BINDER_PROP = 'i_matsci_binding_metal'¶
- __init__(struct, asl='metals', metals=None)¶
Create a ComplexSplitter instance
- Parameters
struct (
schrodinger.structure.Structure
) – The organometallic complexasl (str) – The ASL for finding metal atoms. Ignored if metals is given
metals (list of
schrodinger.structure._StructureAtom
) – Each item is a metal atom to search for binding ligands. Overrides the asl argument.
- findBindingAtoms()¶
Make a list of all atoms that bind to metal atoms
- addDummyAtoms()¶
Add a dummy atom to each binding atom. For eta ligands, a single dummy atom is added at the centroid of the eta atoms. For non-eta ligands, a dummy atom is added along the atom-metal bond vector.
- addEtaDummy(group)¶
Put a dummy atom at the centroid of the haptic ligand
- Parameters
group (list) – A list of atom objects that form the haptic ligand
- addBinderDummy(atom)¶
Add a dummy atom on the atom-metal bond vector that will indicate the proper bond direction after the metal atom is deleted.
- Parameters
atom (
schrodinger.structure._StructureAtom
) – An atom that is bound to the metal
- createLigandStructures()¶
Create individual structures for each ligand. A ligand is defined as a molecule that remains intact after deleting the central metal atom.
- static markRAtomValues(struct)¶
- splitIntoLigands()¶
Split the metal complex into ligands
- Return type
list
- Returns
A list of
schrodinger.structure.Structure
objects, each one represents a unique ligand from the original complex. The ligands will have binding sites to the metal marked with dummy atoms
- static getUniqueLigands(ligands, title=None)¶
Remove duplicate ligands
- Parameters
ligands (list) – A list of
schrodinger.structure.Structure
objects, each one represents a ligand.- Return type
list
- Returns
A list of
schrodinger.structure.Structure
objects, taken from the input ligands and with duplicates removed.
- exception schrodinger.application.matsci.buildcomplex.DuplicateCheckError¶
Bases:
Exception
Raised internally when checking complexes for duplicates
- __init__(*args, **kwargs)¶
- args¶
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- schrodinger.application.matsci.buildcomplex.are_duplicates(ref, comp, tolerance=1.0, check_optical=True)¶
Check if both compounds are duplicate structures. Uses canonical SMILES to detect structures with the same chemical bonding, then Works via actual XYZ coordinates to determine if the structures are duplicates. This is slow, but works for metal complexes.
Note: Requires compounds with reasonable (or consistent) 3D coordinates
- Note: Rotomers of haptic ligands about the haptic axis are generally found
to be different compounds with the default tolerance of 1.0
- Note: Has been tested and seems to work with coordination numbers of 3-6,
and monodentate, bidentate and haptic ligands
- Note: Bonding around the metal atoms is canonicalized during the
comparison to ensure that metal single/dative/ZOB bonding is consistent between the two structures. This done on copies so that the passed-in structures are not modified.
- Parameters
ref (schrodinger.structure.Structure) – The reference complex
comp (schrodinger.structure.Structure) – The structure to compare to the reference
tolerance (float) – The maximum displacement of any one atom before the compounds are considered different complexes
check_optical (bool) – If True, check for optical isomers (and consider them duplicates) by inverting comp about the first atom (assumed to be the metal atom) and performing the same RMSD check against ref. If False, no check is made.
- Return type
bool
- Returns
True if the compounds are found to be identical, False if not
- Raises
ValueError – If there are fewer than 3 usable atoms for the superposiiton
- class schrodinger.application.matsci.buildcomplex.ComplexConformerRmsd(reference_structure, test_structure=None, asl_expr='NOT atom.element H', in_place=True)¶
Bases:
schrodinger.structutils.rmsd.ConformerRmsd
- __init__(reference_structure, test_structure=None, asl_expr='NOT atom.element H', in_place=True)¶
- Parameters
reference_structure (structure.Structure) – Template structure
test_structure (structure.Structure) – The mobile structure.
asl_expr (string) – Atom Language Expression to identify the the atoms used to calculate the RMSD and base the superimpose alignment.
in_place (Boolean) – If True, calculate the RMSD without moving the test_structure. Otherwise, perform the optimal alignment then calculate the RMSD.
- calculate()¶
- Returns
Root-mean-squared difference of atom coordinates.
- Type
float
- Raise
ValueError if working versions of the reference and test structures don’t have the same shape (non-confs).
- The order of operations:
- prepare working copies of the reference and test structures.
** copy the structures. ** encode the original atom indexes as atom properties. ** extract substructure of the atoms matching the ASL. ** reduce to heavy atom graph (instance option, non-default). ** normalize numbering scheme (instance option, default).
determine molecular symmetry mapping (optional, default).
create a numpy coordinate array for the working structures.
- numpy linear algebra SVD to superimpose (instance option).
** transform test_structure
numpy array used to calculate RMSD, and max_dist.
decode original indexes to identify atoms involve in max dist.
- evaluateAsl(st)¶
Return the atoms of the input structure that match <asl_expr>.
- Parameters
st (
structure.Structure
) – Structure to evaluate- Returns
Atoms matching the ASL
- Return type
list of ints
:raise RuntimeError if ASL matching failed.
- getRmsdDataname()¶
- Returns
m2io property dataname string. The property name indicates the reference structure, the title, the ASL used to identify comparison atoms and if the structure is in-place or mobile.
- Return type
string
- orig_index_prop = 'i_confrmsd_original_index'¶
- renumberBySymmetry()¶
Renumber the atoms in _working_test_st based off the reference structure ussing mmsym.
- writeCommand(file_name='rmsd.cmd')¶
Writes a Maestro command file and structures with the pair wise atom mapping in command file mode. The Maestro file has the same basename as the command file. Clobbers existing files.
- Parameters
file_name (string) – Path to the maestro command file with the atom pairings.
- Raise
ValueError if file_name does not have ‘.cmd’ extension.
- writeStructures(file_name='rmsd.mae', mode='w')¶
Writes the reference and test structures to file.
- Parameters
file_name (string) – Path of the structure file to write.
mode (string) – ‘w’ => write, clobber as needed ‘a’ => append
- renumberWorkingStructures()¶
Renumber the working structure so that it has atoms in the same order as the reference structure