aiidalab / aiidalab-docker-stack

Docker images with the basic software stack for AiiDAlab
https://aiidalab.net
Other
9 stars 14 forks source link

Update rdkit and openbabel verisons #129

Closed cpignedoli closed 3 years ago

cpignedoli commented 4 years ago

To have a more robust implementation of the SMILES converter conversion should be first tried via rdkit via a try---except and then via openbabel.

For some strange reason the present versions of openbabel and rdkit interfer one each other it should be better to install:

rdkit=2020.03.6 openbabel=3.1.1

https://github.com/aiidalab/aiidalab-widgets-base/blob/cce7876ab87b3b5876683c4a71c62dfc3117fbd9/aiidalab_widgets_base/structures.py#L517

a correct installation should allow to process the following sequence: `from openbabel import pybel as pb from openbabel import openbabel as ob from rdkit.Chem import MolFromSmiles,MolToMolFile from rdkit import Chem from rdkit.Chem import AllChem

some pybel code

end some pybel code

m = Chem.MolFromSmiles("C") m = Chem.AddHs(m)

AllChem.EmbedMolecule(m, maxAttempts=20, randomSeed=42) AllChem.UFFOptimizeMolecule(m,maxIters=100) m.GetConformer().GetPositions()`

the following sequence instead (with present way to upload pubel) crashes:

`import pybel as pb import openbabel as ob from rdkit.Chem import MolFromSmiles,MolToMolFile from rdkit import Chem from rdkit.Chem import AllChem

some pybel code

end some pybel code

m = Chem.MolFromSmiles("C") m = Chem.AddHs(m)

AllChem.EmbedMolecule(m, maxAttempts=20, randomSeed=42) AllChem.UFFOptimizeMolecule(m,maxIters=100) m.GetConformer().GetPositions()`

yakutovicha commented 4 years ago

The latest version of the rdkit package is already installed, while for the open babel one needs to install it differently: https://anaconda.org/conda-forge/openbabel