OETorLib
class OETorLib
This class represents OETorLib.
See also
OETorDriveOptions class
Constructors
OETorLib()
OETorLib(const unsigned type)
Default and copy constructors. The constructor with the type
parameter allows the user to set the torsion library type from values
in the OETorLibType namespace.
operator bool
operator bool() const
Returns false if the OETorLib object is empty,
otherwise returns true.
AddTorsionLibrary
bool AddTorsionLibrary(const std::string &) bool AddTorsionLibrary(OEPlatform::oeistream &)Takes a
stringor an oeistream object to add a torsion library. This will put the new torsion library above the current torsion library, which means that they will be checked first for a match. To replace the torsion library, callOETorLib.SetTorsionLibrary. Method returnsTrueif the library is added successfully.AddTorsionRule
bool AddTorsionRule(const std::string &)Add a single torsion rule as a string. The format for rules is a SMARTS pattern followed by the torsion angles. Method returns
Trueif the rule is added successfully. The following is an example of a general rule:[*:1][CH2:2][a:3][a:4] 0 180 90 -90 45 -45 135 -135The following code demonstrates how to add a new torsion rule to an existing OEOmega object named
omega.
ClearTorsionLibrary
void ClearTorsionLibrary()Clears the current torsion library. Omega cannot operate with an empty torsion library, so a new torsion library must be set before running Omega.
GetTorRule
const OEChem::OESubSearch* GetTorRule(const OEChem::OEMolBase&, const OEChem::OEBondBase&) constReturns the torsion rule associated with the specified bond of the specified molecule. Method returns a null pointer if a torsion rule is not found. The rules are stored as OESubSearch objects.
See also
OEGetTorValuesfunction.
GetTorRules
OESystem::OEIterBase<OEChem::OESubSearch> *GetTorRules()Returns an iterator over the torsion rules. The rules are stored as OESubSearch objects.
HasTorRule
bool HasTorRule(const OEChem::OEMolBase&, const OEChem::OEBondBase&) constChecks if a torsion rule exists with the specified bond of the specified molecule. Returns
trueif a rule exists.
ResetTorsionLibrary
bool ResetTorsionLibrary()Resets the torsion library stored internally by Omega. Method returns
Trueif the library is reset successfully.
SetTorsionLibrary
bool SetTorsionLibrary(const std::string &) bool SetTorsionLibrary(OEPlatform::oeistream &) bool SetTorsionLibrary(unsigned int type)Replaces the current torsion library with the one passed in as an argument. If the argument is a type, it is expected to be a value in the
OETorLibTypenamespace. Method returnsTrueif the library is set successfully.