exatomic.core.molecule module
Molecule Table
- class exatomic.core.molecule.Molecule(*args, **kwargs)[source]
Bases:
DataFrame
Description of molecules in the atomic universe.
- classify(*classifiers)[source]
Classify molecules into arbitrary categories.
u.molecule.classify(('solute', 'Na'), ('solvent', 'H(2)O(1)'))
- Parameters:
classifiers – Any number of tuples of the form (‘label’, ‘identifier’, exact) (see below)
Note
A classifier has 3 parts, “label”, e.g. “solvent”, “identifier”, e.g. “H(2)O(1)”, and exact (true or false). If exact is false (default), classification is greedy and (in this example) molecules with formulas “H(1)O(1)”, “H(3)O(1)”, etc. would get classified as “solvent”. If, instead, exact were set to true, those molecules would remain unclassified.
Warning
Classifiers are applied in the order passed; where identifiers overlap, the latter classification is used.
See also
compute_nearest_molecules()