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

Module smiles

A module for generating SMILES and unique SMILES strings.

Provides python access to the classes in the canvaslibs_ext directory.

Copyright Schrodinger, LLC. All rights reserved.

Classes [hide private]
  SmilesGenerator
A class to generate a SMILES string from a Structure object.
Functions [hide private]
 
get_property_name(stereo)
Return the default m2io property name for the unique SMILES string with the type of stereochemistry given in 'stereo'.
 
_determine_stereo_option(struct, safe=True)
Look for mmstereo properties in the provide Structure.
 
remove_stereo_annotation(struct)
There is no current option in the SmilesGenerator that can be used to determine stereochemical information from the 3d geometry only.
 
_translate_stereo_enum(stereo, safe=True)
This function translates a module sterechemistry constant into its ChmMmctAdaptor enum equivalent.
 
_get_salt_list()
Returns a list of known salt SMILES strings.
 
_keep_largest_molecule(smi)
 
desalt_smiles(smiles_pattern)
Removes salts (if present) from the specified SMILES pattern.
Variables [hide private]
  _stereo_enums = set([1, 2, 3, 4, 5, 6, '3d', 'annotation', 'an...
  unique_smiles_prop_name = 's_canvas_Unique_SMILES'
  unique_smiles_stereo_prop_name = 's_canvas_Unique_SMILES_Stereo'
  _mmstereo_re = re.compile(r'^s_st_(Chirality|EZ|PM|AtomNumChir...
  _canvas_license = <schrodinger.infra.canvas.ChmLicenseShared; ...
  __package__ = 'schrodinger.structutils'
Function Details [hide private]

get_property_name(stereo)

 

Return the default m2io property name for the unique SMILES string with the type of stereochemistry given in 'stereo'.

Parameters:
  • stereo - Any of the module level variables NO_STEREO, STEREO_FROM_GEOMETRY, STEREO_FROM_ANNOTATION, or STEREO_FROM_ANNOTATION_AND_GEOM, or values from the actual enum in the ChmMmctAdaptor class.

_determine_stereo_option(struct, safe=True)

 

Look for mmstereo properties in the provide Structure.

If mmstereo properties are found, return the type of stereo determination to use as ChmMmctAdaptor.StereoFromAnnotation. Otherwise, return ChmMmctAdaptor.StereoFromGeometry.

Note: the stereo annotations can be stale.

remove_stereo_annotation(struct)

 

There is no current option in the SmilesGenerator that can be used to determine stereochemical information from the 3d geometry only. The STEREO_FROM_3D option does not override any stereochemical annotations that are already present in a structure.

If you want the stereochemistry to be determined by the 3d geometry only, use this function to remove any existing stereochemical annotations.

This is a recognized issue that will be addressed in future releases in a backwards compatible way.

desalt_smiles(smiles_pattern)

 

Removes salts (if present) from the specified SMILES pattern. Will raise a ValueError of the specified compound only contains salts.


Variables Details [hide private]

_stereo_enums

Value:
set([1,
     2,
     3,
     4,
     5,
     6,
     '3d',
     'annotation',
...

_mmstereo_re

Value:
re.compile(r'^s_st_(Chirality|EZ|PM|AtomNumChirality)_')

_canvas_license

Value:
<schrodinger.infra.canvas.ChmLicenseShared; proxy of <Swig Object of t\
ype 'ChmLicenseShared *' at 0x2b21ab58fa80> >