Chemical Data Processing Library Python API - Version 1.2.0
|
Public Member Functions | |
None | __init__ (ElasticPotential pot) |
Initializes a copy of the ElasticPotential instance pot. More... | |
None | __init__ (int atom1_idx, int atom2_idx, float force_const, float ref_length) |
Initializes the ElasticPotential instance. More... | |
int | getAtom1Index () |
int | getAtom2Index () |
float | getForceConstant () |
float | getReferenceLength () |
None | setReferenceLength (float length) |
ElasticPotential | assign (ElasticPotential pot) |
Replaces the current state of self with a copy of the state of the ElasticPotential instance pot. More... | |
int | getObjectID () |
Returns the numeric identifier (ID) of the wrapped C++ class instance. More... | |
Properties | |
objectID = property(getObjectID) | |
atom1Index = property(getAtom1Index) | |
atom2Index = property(getAtom2Index) | |
forceConstant = property(getForceConstant) | |
referenceLength = property(getReferenceLength, setReferenceLength) | |
None CDPL.ForceField.ElasticPotential.__init__ | ( | ElasticPotential | pot | ) |
Initializes a copy of the ElasticPotential instance pot.
pot | The ElasticPotential instance to copy. |
None CDPL.ForceField.ElasticPotential.__init__ | ( | int | atom1_idx, |
int | atom2_idx, | ||
float | force_const, | ||
float | ref_length | ||
) |
Initializes the ElasticPotential instance.
atom1_idx | |
atom2_idx | |
force_const | |
ref_length |
int CDPL.ForceField.ElasticPotential.getAtom1Index | ( | ) |
int CDPL.ForceField.ElasticPotential.getAtom2Index | ( | ) |
float CDPL.ForceField.ElasticPotential.getForceConstant | ( | ) |
float CDPL.ForceField.ElasticPotential.getReferenceLength | ( | ) |
None CDPL.ForceField.ElasticPotential.setReferenceLength | ( | float | length | ) |
length |
ElasticPotential CDPL.ForceField.ElasticPotential.assign | ( | ElasticPotential | pot | ) |
Replaces the current state of self with a copy of the state of the ElasticPotential instance pot.
pot | The ElasticPotential instance to copy. |
int CDPL.ForceField.ElasticPotential.getObjectID | ( | ) |
Returns the numeric identifier (ID) of the wrapped C++ class instance.
Different Python ElasticPotential instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b
thus cannot tell reliably whether the two ElasticPotential instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID()
.