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.SUPPORTED_GEOMETRIES = ['Octahedral', 'Trigonal bipyramidal', 'Tetrahedral', 'Square planar', 'Trigonal planar', 'Linear']

VESPR geometries that can be build by this module

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.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 minimize
  • ffld_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)

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 copy
  • index (int) – The atom index of the metal atom with bonds to adjust
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 element
  • element (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 atoms
  • rx_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 atoms
  • rx_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
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 structure
  • sites (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

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 ligand
  • site (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 ligand
  • sites (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__

Initialize self. See help(type(self)) for accurate signature.

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

__init__

Initialize self. See help(type(self)) for accurate signature.

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:
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.