Package schrodinger :: Package application :: Package combiglide :: Package packages :: Module chutils :: Class ChUtils
[hide private]
[frames] | no frames]

Class ChUtils

Utilities generally useful in core-hopping

Static Methods [hide private]
 
get_create_linker_table_sql(dbname)
 
get_chmmol(st, stereo=2)
list of lists
get_canvas_sssr(st=None, chmmol=None, use_st_numbering=True, stereo=2)
Given a structure or a chmmol, return the "smallest set of smallest rings" as determined by Canvas.
 
evaluate_smarts_canvas(smarts, chmmol)
Evaluate SMARTS patterns using the Canvas libraries.
 
get_template_from_tos(st)
Given a template with an m_attachment block, return a list of From-To pairs.
 
make_rsts(template_st, template_from_tos)
Create R-group st's from a template st and its from-to pairs.
 
get_labeled_from_tos(st, my_from_index=None)
Given an st with some terminal atoms bearing a non-empty 's_cgch_attachment', return a list of From-To atom-index pairs, where the labeled atoms are the To's and their attached atoms are the coresponding Froms.
 
get_from_atoms(st, possible_linker=False)
Return attachment atoms for st; if possible_linker is True, then just return linker attachments if it's a linker.
 
blobify_int_seq(seq)
From an int sequence, create an object that can be inserted into an SQLite DB as a blob
 
deblobify_int_seq(blob)
Create a list of ints from a previously blobified int sequence
 
blobify_st(st)
Given an st, return a blob suitable for insertion into sqlite, and the length of the uncompressed structure string.
 
deblobify_st(bst)
Given a blobified st, return the st
Method Details [hide private]

get_canvas_sssr(st=None, chmmol=None, use_st_numbering=True, stereo=2)
Static Method

 

Given a structure or a chmmol, return the "smallest set of smallest rings" as determined by Canvas. Either st or chmmol must be provided. If both are provided, chmmol will be used.

Parameters:
  • st (schrodinger.structure.Structure) - A chemical structure
  • chmmol (schrodinger.canvas.ChmMol) - A chemical structure
  • use_st_numbering (bool) - If True, add one to chmmol atom numbers
  • stereo (canvas.ChmMmctAdaptor stereo option) - Stereo option for conversion of st to chmmol, if no chmmol is provided
Returns: list of lists
List containing the atom numbers of the determined sssr rings

evaluate_smarts_canvas(smarts, chmmol)
Static Method

 

Evaluate SMARTS patterns using the Canvas libraries.  Returns 
a sorted list of tuples, the tuples being the atom-index
 sequences constituting the matches.

make_rsts(template_st, template_from_tos)
Static Method

 

Create R-group st's from a template st and its from-to pairs.

template_st contains a template structure; template_from_tos is a sequence of from-to atom-index pairs defining the R groups.

Return a list of triplet tuples: (st, from, to), where st is a gzipped BLOB and from and to are integer atom numbers for the pendant from-to on the R-group st. The first triplet tuple is for R1, the second for R2, and so on.

Each st is created from the template file as follows: Break the from-to bond; extract the peripheral fragment into its own st; add H; label the the added H with s_cgch_attachment='y'.

get_labeled_from_tos(st, my_from_index=None)
Static Method

 

Given an st with some terminal atoms bearing a non-empty 's_cgch_attachment', return a list of From-To atom-index pairs, where the labeled atoms are the To's and their attached atoms are the coresponding Froms. If my_from_index is not None, only return pairs for the specified my_from_index.

get_from_atoms(st, possible_linker=False)
Static Method

 

Return attachment atoms for st; if possible_linker is True, then just return linker attachments if it's a linker. This is determined by the presence of an 's_cgch_attachment' on the To atom.