aiidalab / aiidalab-qe

AiiDAlab App for Quantum ESPRESSO
https://aiidalab-qe.readthedocs.io/
MIT License
12 stars 14 forks source link

Could not create a water molecule with the SMILES structure generator #115

Closed csadorf closed 3 years ago

csadorf commented 3 years ago

Automated report

This issue was created with the app's automated bug reporting feature. Attached to this issue is the full traceback as well as an environment fingerprint that contains information about the operating system as well as all installed libraries.

Additional comments (optional):

I tried to create a water molecule with the SMILES structure generator.

Attachments

Traceback ```python-traceback ArgumentError Traceback (most recent call last) ~/.local/lib/python3.7/site-packages/aiidalab_widgets_base/structures.py in _on_button_pressed(self, change) 718 self.SPINNER 719 ) # font-size:20em; --> 720 self.structure = self.mol_from_smiles(self.smiles.value) 721 self.output.value = "" 722 ~/.local/lib/python3.7/site-packages/aiidalab_widgets_base/structures.py in mol_from_smiles(self, smile, steps) 705 """Convert SMILES to ase structure try rdkit then pybel""" 706 try: --> 707 return self._rdkit_opt(smile, steps) 708 except ValueError: 709 return self._pybel_opt(smile, steps) ~/.local/lib/python3.7/site-packages/aiidalab_widgets_base/structures.py in _rdkit_opt(self, smile, steps) 693 smile = smile.replace("[", "").replace("]", "") 694 mol = Chem.MolFromSmiles(smile) --> 695 mol = Chem.AddHs(mol) 696 697 AllChem.EmbedMolecule(mol, maxAttempts=20, randomSeed=42) ArgumentError: Python argument types in rdkit.Chem.rdmolops.AddHs(NoneType) did not match C++ signature: AddHs(RDKit::ROMol mol, bool explicitOnly=False, bool addCoords=False, boost::python::api::object onlyOnAtoms=None, bool addResidueInfo=False) ```
Environment fingerprint
eNp9WE1v5LgR_StG57pqSOq2257bxps9BONkdj2bRRAEASVRLbopkSYpt-
XF_PctVhXV9BgI7Es_fle9elWlPzYv0nllps2n6oeN1SL0xo2bT39shGsHFWQbZic3n_6zudk3Kmx-2Gz-C_OWMJjpf-
vSzW572N7B4AX5S3X1-PDl6ussrx7EclVVV3X56br8VB6ufvt6Dz_qavMNdhLtSRylxxOV6kTRiKnzhZq8hbNho3K735awNY-qY9
cTXG9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mlfSzf9p5fT4-Jkig2m6xAdyuMDEA2KAQPOTXHXgg_0IAeuzhPNleQRx9lzn0XZBetKaGlWPUyoYSLI_
69VqOALJL9VHZb5ilCOV8CQ-d5cRDxxU_cJFZ9oKsvOTz-N5CeapFaPl4GLMiSXrYAB4I3snm_37x4fPrIu08xv2hXXN0gZN5-UT
BraUcRocHqs6Vg9CnmewBM2rSSgTVuDDsgreSVicamtKDW4Wo9SxrdZFKsyxDL0t19FtHF3D9zt8y-1LyQ0OpDqIsAJ6MUfNQ71P
OIcKUd5L0RieUlGe9FKebMpHd0iRR0h59Vcn_JA5H4R4tmtjdRe1CukeNbusyhjVfpA6dhGDGDNm-gEqvXlWXcYtr2KrE0sXKgpJ
ab16pbAmbfGTOTfQrAJZx5GjlFzt7TEVR6xtjxieXAHhCRSvICpLA_0K91Rkfh6DRNabeYI2EqrXrK_gYUgR6YMKOZLwNnajUChA
j68lPNhmafv9DGgNoU3wRaegTQnQ_Wdk_X7my__dKX5e4Ak1V13vJzz5taQoszek4eeQbb_7MAwSqKCXeYuuSx8yKswpNA_KTijT
4Rmi71ONijz55fOPOpaea2zs36HFb2uhvbvBDyj-WaPkpoosQkG4mMFlyjtR9P3csOjvanTqNaqHX1KdETeDvDlrEVIZFkUEsjn0
34I_tnGvEUVr_e5C1ArxSfOkYvvZUe6NZolCIzoLJG-D5n4Pp5sUiuQd0DQ-
hNgXnrsRU801_3ZCBZ3aFCIdYpDLpM_6DPgNRqd2In768KlHIieHN6iPBd0kTp-n-
KVCQF5Xkqeim2bbg3AVHE8pR8wOorHZUVqk-P-XgLZrySqSF6MhqmeTvk_QOWcR2qEzx_TmaPtzC6X_-
vEqnnqWjZzAfvCCFCZx8e_Snd7kfMzYeB6k1IkH8VjqIug78_p5iHIdD31fHNX8VO4_pma1GfMDz4FmltJpRc-
DTmLtjaIGxocswLdMEt8UfsSkVuDbtz8BsCSrHg==

By submitting this issue I confirm that I am aware that this information can potentially be used to determine what kind of calculation was performed at the time of error.

csadorf commented 3 years ago

SMILES is no longer a default structure selector, because molecules are currently not supported as valid input.