pnnl / isicle

In silico chemical library engine for high-accuracy chemical property prediction
BSD 3-Clause "New" or "Revised" License
58 stars 19 forks source link

Geom class error #27

Closed pan0sr closed 7 months ago

pan0sr commented 7 months ago

Hi all, I am trying to get started using isicle but im running into an issue when following the NMR example presented here.

import isicle

geom = isicle.io.load('molecule.mol')
geom = geom.initial_optimize(embed=True)

geom.mol

conformer = geom.md(forcefield='gff',
                    ewin = 3,
                    task = 'conformer',
                    charge = geom.get_formal_charge(),
                    solvation = 'water',
                    processes = 4)

This is what im trying to run where molecule.mol is a valid .mol file in the directory. However im getting the following error.

AttributeError                            Traceback (most recent call last)
Cell In[3], [line 4](vscode-notebook-cell:?execution_count=3&line=4)
      [1](vscode-notebook-cell:?execution_count=3&line=1) conformer = geom.md(forcefield='gff',
      [2](vscode-notebook-cell:?execution_count=3&line=2)                     ewin = 3,
      [3](vscode-notebook-cell:?execution_count=3&line=3)                     task = 'conformer',
----> [4](vscode-notebook-cell:?execution_count=3&line=4)                     charge = geom.get_formal_charge(),
      [5](vscode-notebook-cell:?execution_count=3&line=5)                     solvation = 'water',
      [6](vscode-notebook-cell:?execution_count=3&line=6)                     processes = 4)

AttributeError: 'Geometry' object has no attribute 'get_formal_charge'

Any help would be much appreciated.

pan0sr commented 7 months ago

Problem was solved : correct function call should be :

geom.get_charge()

jessbade commented 7 months ago

@pan0sr I apologize our docs are a bit behind, we have that slated for update soon. In the meantime, please reach out if you have any questions or would like help in putting together a workflow.