schrodinger.structutils.createfragments module¶
This script will break up a set of input molecules into fragments based on some simple rules, similar to those described in the original RECAP paper. Run with -h to see the basic rules.
If -murcko option is specified, then Murco Assembly scaffolds are generated instead of fragments. This is done by removing terminal from each “branch” until reacing a ring.
If -recap option is specified, then rules are as follows:
- Only break the bonds matching the RECAP SMARTS patterns.
- Amide
- Ester
- Amine
- Urea
- Ether
- Olefin
- Quarternary nitrogen
- Aromatic nitrogen - aliphatic carbon
- Lactam nitrogen - aliphatic carbon
- Aromatic carbon - aromatic carbon
- Sulphonamide
- Do not break ring bonds
- Do not break bonds that would yield one of the following fragments: hydrogen, methane, ethane, prone, butane.
NOTE: -recap_use can be used to specify which RECAP rules to use. The value must be a list of comma-separated numbers (no spaces).
Example usage:
from schrodinger.structutils import createfragments
frag_creator = createfragments.FragmentCreator(atoms=options.atoms,
bonds=options.bonds, smarts=options.smarts,
carbon_hetero=options.carbon_hetero,
maxatoms=options.maxatoms,
removedup=options.removedup, murcko=options.murcko,
recap=options.recap, recap_use=recap_list,
complete=options.complete,
add_h=options.add_h, verbose=True)
for struct in my_structures:
# fragments is a list of Structure objects
fragments = frag_creator.fragmentStructure(struct)
Copyright Schrodinger, LLC. All rights reserved.
-
schrodinger.structutils.createfragments.
are_sts_the_same
(st1, st2)¶ Checks coordinates of each atom in the specified structures and returns true if they are the same
Parameters: - st1 (
structure.Structure
) – The first structure for comparison - st2 (
structure.Structure
) – The second structure for comparison
Return type: bool
Returns: True if the structures have the same coordinates, False if not
- st1 (
-
schrodinger.structutils.createfragments.
find_recap_bonds
(st, options)¶ Find all bonds that match the RECAP rules described in J. Chem. Inf. Comput. Sci. 1998, 38, 511-522
Will return a list of [(atom1, atom2, rule_num)].
Parameters: - st (
schrodinger.structure.Structure
) – The structure to search for RECAP rule bonds - options – The object holding the compute options
Return type: set of tuples
Returns: Each tuple is (atom1, atom2, rule_num) where atom1 and atom2 are the atoms involved in the bond and rule_num is the recap rule that the bond matches. atom1 and atom2 are sorted.
- st (
-
class
schrodinger.structutils.createfragments.
FragmentCreator
(**kwargs)¶ Bases:
object
This class will break up input structures into fragments based on some simple rules. The basic rules are:
- Cut one of these 2 types of bonds
- Bonds to rings
- Do not cut bonds to hydrogens
- Do not cut any in-ring bonds
- Do not cut bonds between ring-carbon and a non-carbon atoms (allowed with -c option)
- Carbon-carbon bonds a. Do not cut any bonds if either atom is in any ring
- Refuse a fragment if any part of it matches a line in the SMARTS file specified by -smarts.
- Refuse a fragment if the number of broken bonds exceeds -bonds.
- Refuse a fragment if the number of atoms is less than -atoms.
- Do not attempt to fragment molecules with more than -maxatoms atoms.
For -recap option, here are the rules that are used:
- [#6][C;X3](=O)!@[N;X3] Amide
- [!#1][O;X2]!@[C;X3](=O)[C;X4;H2,H3] Ester
- [#7;X3](!@[C,N&X3,#1])([C,N&X3,#1])[C,N&X3,#1] Amine
- [#7;X3]!@[C;X3](=O)[#7;X3] Urea
- [#6]!@[O;X2][#6] Ether
- [#6]=!@[#6] Olefin
- [#7;X4]!@[#6] Quarternary nitrogen
- [n]!@[C] Aromatic nitrogen - aliphatic carbon
- C!@N@C=O Lactam nitrogen - aliphatic carbon
- c!@c Aromatic carbon - aromatic carbon
- [#7][S;X4](=O)(=O) Sulphonamide
-
getPatternString
()¶ Get a string that describes the RECAP patterns
Return type: str Returns: A string describing the RECAP patterns.
-
checkArgs
()¶ Check the input arguments for appropriate usage
-
fragmentStructure
(struct)¶ Break the input structure into fragments.
Parameters: struct ( schrodinger.structure.Structure
) – The structure to break into fragmentsReturn type: list Returns: list of schrodinger.structure.Structure
objects for the fragments.
-
fragmentStructureForEA
(struct)¶ Break the input structure into fragments. Used for Event Analyis (EA)
Returns: list of schrodinger.structure.Structure
objects for the fragments