lich-uct / molpher-lib

C++/Python Library for Systematic Chemical Space Exploration
https://lich-uct.github.io/molpher-lib/
Other
18 stars 7 forks source link

Add properties to MolpherMol and MolpherAtom #4

Open martin-sicho opened 6 years ago

martin-sicho commented 6 years ago

It would be nice if users had the option to store some data with the instances of MolpherMol and MolpherAtom (like it is possible in RDKit or other libraries). It could work like so:

mol = MolpherMol("CCO")
mol.setProp("Name", "ethanol")
for idx, atom in enumerate(mol.atoms):
    atom.setProp("AtomID", mol.getProp("Name") + "." + str(idx))