Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self-polarization correction does not work with Liquid_SMIRNOFF #225

Closed
jthorton opened this issue Jun 4, 2021 · 0 comments · Fixed by #226
Closed

Self-polarization correction does not work with Liquid_SMIRNOFF #225

jthorton opened this issue Jun 4, 2021 · 0 comments · Fixed by #226

Comments

@jthorton
Copy link
Contributor

jthorton commented Jun 4, 2021

Suppling the self-polarization correction terms self_pol_mu0 and self_pol_alpha results in an error when using the Liquid_SMIRNOFF target related to a missing PDB file see error below. I think this is due to inconsistencies in the implementation of the SMIRNOFF engine, in particular, the readsrc and prepare functions require the path to a pdb file be supplied which it is not always, but the normal OPENMM engine is able to build the path from the molecule object which is always supplied. Is there any danger in unifying the behaviour of these two methods?

Traceback (most recent call last):
  File "/Users/joshua/miniconda3/envs/openff-plugins/lib/python3.8/site-packages/forcebalance-1.8.1-py3.8-macosx-10.9-x86_64.egg/EGG-INFO/scripts/ForceBalance.py", line 41, in Run_ForceBalance
    objective   = Objective(options, tgt_opts, forcefield)
  File "/Users/joshua/miniconda3/envs/openff-plugins/lib/python3.8/site-packages/forcebalance-1.8.1-py3.8-macosx-10.9-x86_64.egg/forcebalance/objective.py", line 182, in __init__
    else: Tgt = Implemented_Targets[opts['type']](options,opts,forcefield)
  File "/Users/joshua/miniconda3/envs/openff-plugins/lib/python3.8/site-packages/forcebalance-1.8.1-py3.8-macosx-10.9-x86_64.egg/forcebalance/smirnoffio.py", line 623, in __init__
    self.post_init(options)
  File "/Users/joshua/miniconda3/envs/openff-plugins/lib/python3.8/site-packages/forcebalance-1.8.1-py3.8-macosx-10.9-x86_64.egg/forcebalance/liquid.py", line 241, in post_init
    self.gas_engine = self.engine_(target=self, mol=self.gas_mol, name="selfpol", **self.gas_engine_args)
  File "/Users/joshua/miniconda3/envs/openff-plugins/lib/python3.8/site-packages/forcebalance-1.8.1-py3.8-macosx-10.9-x86_64.egg/forcebalance/smirnoffio.py", line 263, in __init__
    super(SMIRNOFF,self).__init__(name=name, **kwargs)
  File "/Users/joshua/miniconda3/envs/openff-plugins/lib/python3.8/site-packages/forcebalance-1.8.1-py3.8-macosx-10.9-x86_64.egg/forcebalance/openmmio.py", line 587, in __init__
    super(OpenMM,self).__init__(name=name, **kwargs)
  File "/Users/joshua/miniconda3/envs/openff-plugins/lib/python3.8/site-packages/forcebalance-1.8.1-py3.8-macosx-10.9-x86_64.egg/forcebalance/engine.py", line 77, in __init__
    self.readsrc(**kwargs)
  File "/Users/joshua/miniconda3/envs/openff-plugins/lib/python3.8/site-packages/forcebalance-1.8.1-py3.8-macosx-10.9-x86_64.egg/forcebalance/smirnoffio.py", line 287, in readsrc
    raise RuntimeError('Name of PDB file not provided.')
RuntimeError: Name of PDB file not provided.

@jthorton jthorton mentioned this issue Jun 4, 2021
leeping added a commit that referenced this issue Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant