Package schrodinger :: Package structutils :: Module createfragments
[hide private]
[frames] | no frames]

Module createfragments


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:
I. Only break the bonds matching the RECAP SMARTS patterns.
     1 = Amide
     2 = Ester
     3 = Amine
     4 = Urea
     5 = Ether
     6 = Olefin
     7 = Quarternary nitrogen, 
     8 = Aromatic nitrogen - aliphatic carbon
     9 = Lactam nitrogen - aliphatic carbon
     10 = Aromatic carbon - aromatic carbon
     11 = Sulphonamide
  II. Do not break ring bonds
  III. 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.

Classes [hide private]
  _Options
A class to hold a list of options.
  FragmentCreator
This class will break up input structures into fragments based on some simple rules.
  _StructureFragmenter
Class to create fragments from a given set of _Options and a given schrodinger.structure.Structure.
Functions [hide private]
bool
are_sts_the_same(st1, st2)
Checks coordinates of each atom in the specified structures and returns true if they are the same
set of tuples
find_recap_bonds(st, options)
Find all bonds that match the RECAP rules described in J.
Variables [hide private]
  logger = log.get_output_logger(__file__)
  ATTACHPROP = 'b_fragmol_attachment'
  RECAP_PROP_PREFIX = 'b_fragmol_recap_'
  RECAP_PATTERNS = [('[#6][C;X3](=O)!@[N;X3]', 2, 4, 'Amide'), (...
  TERMINAL_PATTERNS = ['[C;X4;H3]', '[O][C;X4;H3]', '[C;X4;H2][C...
  __package__ = 'schrodinger.structutils'
Function Details [hide private]

are_sts_the_same(st1, st2)

 

Checks coordinates of each atom in the specified structures and returns true if they are the same

Parameters:
Returns: bool
True if the structures have the same coordinates, False if not

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:
Returns: set of tuples
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.

Variables Details [hide private]

RECAP_PATTERNS

Value:
[('[#6][C;X3](=O)!@[N;X3]', 2, 4, 'Amide'),
 ('[!#1][O;X2]!@[C;X3](=O)[C;X4;H2,H3]', 2, 3, 'Ester'),
 ('[#7;X3](!@[C,N&X3,#1])([C,N&X3,#1])[C,N&X3,#1]', 1, 2, 'Amine'),
 ('[#7;X3]!@[C;X3](=O)[#7;X3]', 1, 2, 'Urea'),
 ('[#6]!@[O;X2][#6]', 1, 2, 'Ether'),
 ('[#6]=!@[#6]', 1, 2, 'Olefin'),
 ('[#7;X4]!@[#6]', 1, 2, 'Quarternary nitrogen'),
 ('[n]!@[C]', 1, 2, 'Aromatic nitrogen - aliphatic carbon'),
...

TERMINAL_PATTERNS

Value:
['[C;X4;H3]',
 '[O][C;X4;H3]',
 '[C;X4;H2][C;X4;H3]',
 '[O][C;X4;H2][C;X4;H3]',
 '[C;X4;H2][C;X4;H2][C;X4;H3]',
 '[C;X4;H2][C;X4;H2][C;X4;H2][C;X4;H3]']