Chemical Data Processing Library Python API - Version 1.1.1
|
A data type for the storage of mass percent compositions of chemical compounds. More...
Public Member Functions | |
None | __init__ () |
Initializes the MassComposition instance. | |
None | __init__ (MassComposition mass_comp) |
Initializes a copy of the MassComposition instance mass_comp. More... | |
int | getObjectID () |
Returns the numeric identifier (ID) of the wrapped C++ class instance. More... | |
int | getSize () |
bool | isEmpty () |
None | clear () |
MassComposition | assign (MassComposition map) |
Replaces the current state of self with a copy of the state of the MassComposition instance map. More... | |
float | getValue (int key) |
float | getValue (int key, float def_value) |
bool | removeEntry (int key) |
None | setEntry (int key, float value) |
object | getKeys () |
object | keys () |
object | getValues () |
object | values () |
object | getEntries () |
object | items () |
bool | containsEntry (int key) |
bool | insertEntry (int key, float value) |
int | __len__ () |
float | __getitem__ (int key) |
None | __setitem__ (int key, float value) |
bool | __delitem__ (int key) |
bool | __contains__ (int key) |
Returns the result of the membership test operation key in self . More... | |
bool | __eq__ (object mass_comp) |
Returns the result of the comparison operation self == mass_comp . More... | |
bool | __ne__ (object mass_comp) |
Returns the result of the comparison operation self != mass_comp . More... | |
bool | __le__ (object mass_comp) |
Returns the result of the comparison operation self <= mass_comp . More... | |
bool | __ge__ (object mass_comp) |
Returns the result of the comparison operation self >= mass_comp . More... | |
bool | __lt__ (object mass_comp) |
Returns the result of the comparison operation self < mass_comp . More... | |
bool | __gt__ (object mass_comp) |
Returns the result of the comparison operation self > mass_comp . More... | |
Properties | |
objectID = property(getObjectID) | |
size = property(getSize) | |
A data type for the storage of mass percent compositions of chemical compounds.
MassComposition
is an unique associative map where the keys specify the atom type (defined in namespace Chem.AtomType) of the chemical elements and the mapped floating-point values correspond to the percentage contribution of the elements to the total mass of the compound.
None CDPL.MolProp.MassComposition.__init__ | ( | MassComposition | mass_comp | ) |
Initializes a copy of the MassComposition instance mass_comp.
mass_comp | The MassComposition instance to copy. |
int CDPL.MolProp.MassComposition.getObjectID | ( | ) |
Returns the numeric identifier (ID) of the wrapped C++ class instance.
Different Python MassComposition 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 MassComposition 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()
.
int CDPL.MolProp.MassComposition.getSize | ( | ) |
bool CDPL.MolProp.MassComposition.isEmpty | ( | ) |
MassComposition CDPL.MolProp.MassComposition.assign | ( | MassComposition | map | ) |
Replaces the current state of self with a copy of the state of the MassComposition instance map.
map | The MassComposition instance to copy. |
float CDPL.MolProp.MassComposition.getValue | ( | int | key | ) |
key |
float CDPL.MolProp.MassComposition.getValue | ( | int | key, |
float | def_value | ||
) |
key | |
def_value |
bool CDPL.MolProp.MassComposition.removeEntry | ( | int | key | ) |
key |
None CDPL.MolProp.MassComposition.setEntry | ( | int | key, |
float | value | ||
) |
key | |
value |
object CDPL.MolProp.MassComposition.getKeys | ( | ) |
object CDPL.MolProp.MassComposition.keys | ( | ) |
object CDPL.MolProp.MassComposition.getValues | ( | ) |
object CDPL.MolProp.MassComposition.values | ( | ) |
object CDPL.MolProp.MassComposition.getEntries | ( | ) |
object CDPL.MolProp.MassComposition.items | ( | ) |
bool CDPL.MolProp.MassComposition.containsEntry | ( | int | key | ) |
key |
bool CDPL.MolProp.MassComposition.insertEntry | ( | int | key, |
float | value | ||
) |
key | |
value |
int CDPL.MolProp.MassComposition.__len__ | ( | ) |
float CDPL.MolProp.MassComposition.__getitem__ | ( | int | key | ) |
key |
None CDPL.MolProp.MassComposition.__setitem__ | ( | int | key, |
float | value | ||
) |
key | |
value |
bool CDPL.MolProp.MassComposition.__delitem__ | ( | int | key | ) |
key |
bool CDPL.MolProp.MassComposition.__contains__ | ( | int | key | ) |
Returns the result of the membership test operation key in self
.
key | The value to test for membership. |
bool CDPL.MolProp.MassComposition.__eq__ | ( | object | mass_comp | ) |
Returns the result of the comparison operation self == mass_comp
.
mass_comp | The object instance to be compared with. |
bool CDPL.MolProp.MassComposition.__ne__ | ( | object | mass_comp | ) |
Returns the result of the comparison operation self != mass_comp
.
mass_comp | The object instance to be compared with. |
bool CDPL.MolProp.MassComposition.__le__ | ( | object | mass_comp | ) |
Returns the result of the comparison operation self <= mass_comp
.
mass_comp | The object instance to be compared with. |
bool CDPL.MolProp.MassComposition.__ge__ | ( | object | mass_comp | ) |
Returns the result of the comparison operation self >= mass_comp
.
mass_comp | The object instance to be compared with. |
bool CDPL.MolProp.MassComposition.__lt__ | ( | object | mass_comp | ) |
Returns the result of the comparison operation self < mass_comp
.
mass_comp | The object instance to be compared with. |
bool CDPL.MolProp.MassComposition.__gt__ | ( | object | mass_comp | ) |
Returns the result of the comparison operation self > mass_comp
.
mass_comp | The object instance to be compared with. |