Chemical Data Processing Library Python API - Version 1.4.0
Public Member Functions | Static Public Member Functions | List of all members
CDPL.ConfGen.TorsionLibrary Class Reference

Data structure representing a hierarchical library of torsion rules organized into categories. More...

+ Inheritance diagram for CDPL.ConfGen.TorsionLibrary:

Public Member Functions

None __init__ ()
 Initializes the TorsionLibrary instance.
 
None __init__ (TorsionLibrary lib)
 Initializes a copy of the TorsionLibrary instance lib. More...
 
None load (Base.IStream is)
 Reads the library content from the input stream is in the XML-based CDPL torsion library format. More...
 
None loadDefaults ()
 Loads the built-in CDPL default torsion library.
 
None save (Base.OStream os)
 Writes the library content to the output stream os in the XML-based CDPL torsion library format. More...
 
TorsionLibrary assign (TorsionLibrary lib)
 Replaces the current state of self with a copy of the state of the TorsionLibrary instance lib. More...
 
- Public Member Functions inherited from CDPL.ConfGen.TorsionCategory
None __init__ (TorsionCategory cat)
 Initializes a copy of the TorsionCategory instance cat. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
TorsionCategory assign (TorsionCategory cat)
 Replaces the current state of self with a copy of the state of the TorsionCategory instance cat. More...
 
str getMatchPatternString ()
 Returns the SMARTS match pattern describing the bonds that belong to this category. More...
 
None setMatchPatternString (str ptn_str)
 Sets the SMARTS match pattern describing the bonds that belong to this category. More...
 
Chem.MolecularGraph getMatchPattern ()
 Returns the match pattern molecular graph used to perceive the bonds that belong to this category. More...
 
None setMatchPattern (Chem.MolecularGraph ptn)
 Sets the match pattern molecular graph used to perceive the bonds that belong to this category. More...
 
int getBondAtom1Type ()
 Returns the atom type of the first central bond atom required by this category. More...
 
None setBondAtom1Type (int type)
 Sets the atom type of the first central bond atom required by this category. More...
 
int getBondAtom2Type ()
 Returns the atom type of the second central bond atom required by this category. More...
 
None setBondAtom2Type (int type)
 Sets the atom type of the second central bond atom required by this category. More...
 
str getName ()
 Returns the category name. More...
 
None setName (str name)
 Sets the category name. More...
 
int getNumRules (bool recursive=False)
 Returns the number of contained torsion rules. More...
 
TorsionRule getRule (int idx)
 Returns the torsion rule at index idx. More...
 
None removeRule (int idx)
 Removes the torsion rule at index idx. More...
 
TorsionRule addRule (TorsionRule rule)
 Appends a copy of rule as a contained torsion rule. More...
 
RuleSequence getRules ()
 
int getNumCategories (bool recursive=False)
 Returns the number of child categories. More...
 
TorsionCategory getCategory (int idx)
 Returns the child category at index idx. More...
 
None removeCategory (int idx)
 Removes the child category at index idx. More...
 
TorsionCategory addCategory (TorsionCategory cat)
 Appends a copy of cat as a child category. More...
 
CategorySequence getCategories ()
 
None clear ()
 Removes all child categories and contained rules and resets the pattern/atom type data.
 
None swap (TorsionCategory cat)
 Swaps the contents of this category with cat. More...
 

Static Public Member Functions

None set (TorsionLibrary map)
 
TorsionLibrary get ()
 Returns the globally accessible default torsion library (created on first access). More...
 

Additional Inherited Members

- Properties inherited from CDPL.ConfGen.TorsionCategory
 objectID = property(getObjectID)
 
 rules = property(getRules)
 
 categories = property(getCategories)
 
 numRules = property(getNumRules)
 
 numCategories = property(getNumCategories)
 
 bondAtom1Type = property(getBondAtom1Type, setBondAtom1Type)
 
 bondAtom2Type = property(getBondAtom2Type, setBondAtom2Type)
 
 matchPatternString = property(getMatchPatternString, setMatchPatternString)
 
 matchPattern = property(getMatchPattern, setMatchPattern)
 
 name = property(getName, setName)
 

Detailed Description

Data structure representing a hierarchical library of torsion rules organized into categories.

TorsionLibrary extends ConfGen.TorsionCategory with XML load/save methods and provides static set()/get() accessors for a process-wide default torsion library.

Constructor & Destructor Documentation

◆ __init__()

None CDPL.ConfGen.TorsionLibrary.__init__ ( TorsionLibrary  lib)

Initializes a copy of the TorsionLibrary instance lib.

Parameters
libThe TorsionLibrary instance to copy.

Member Function Documentation

◆ load()

None CDPL.ConfGen.TorsionLibrary.load ( Base.IStream  is)

Reads the library content from the input stream is in the XML-based CDPL torsion library format.

Parameters
isThe input stream to read from.

◆ save()

None CDPL.ConfGen.TorsionLibrary.save ( Base.OStream  os)

Writes the library content to the output stream os in the XML-based CDPL torsion library format.

Parameters
osThe output stream to write to.

◆ assign()

TorsionLibrary CDPL.ConfGen.TorsionLibrary.assign ( TorsionLibrary  lib)

Replaces the current state of self with a copy of the state of the TorsionLibrary instance lib.

Parameters
libThe TorsionLibrary instance to copy.
Returns
self

◆ set()

None CDPL.ConfGen.TorsionLibrary.set ( TorsionLibrary  map)
static
Parameters
map

◆ get()

TorsionLibrary CDPL.ConfGen.TorsionLibrary.get ( )
static

Returns the globally accessible default torsion library (created on first access).

Returns
A reference to the default torsion library shared reference.