choderalab / perses

Experiments with expanded ensembles to explore chemical space
http://perses.readthedocs.io
MIT License
181 stars 51 forks source link

Failing test_fah.py for BACE ligands #742

Open zhang-ivy opened 4 years ago

zhang-ivy commented 4 years ago

We're seeing the following error in test_fah.py when using BACE ligands in test_pipeline_small_molecule_solvent. I've changed it to use CDK ligands instead here for now:

======================================================================
ERROR: perses.tests.test_fah.test_pipeline_small_molecule_solvent
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/share/miniconda/envs/test/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/runner/work/perses/perses/perses/tests/test_fah.py", line 71, in test_pipeline_small_molecule_solvent
    num_equilibration_steps_per_iteration = DEFAULT_EQ_STEPS_PER_ITERATION)
  File "/home/runner/work/perses/perses/perses/app/fah_generator.py", line 359, in run_neq_fah_setup
    setup_dict = run_setup(setup_options, serialize_systems=False, build_samplers=False)
  File "/home/runner/work/perses/perses/perses/app/setup_relative_calculation.py", line 440, in run_setup
    complex_box_dimensions=setup_options['complex_box_dimensions'],solvent_box_dimensions=setup_options['solvent_box_dimensions'], ionic_strength=ionic_strength, remove_constraints=setup_options['remove_constraints'])
  File "/home/runner/work/perses/perses/perses/app/relative_setup.py", line 348, in __init__
    small_molecule_forcefield=small_molecule_forcefield, molecules=molecules, cache=small_molecule_parameters_cache, periodic_forcefield_kwargs = {'nonbondedMethod': self._nonbonded_method})
  File "/usr/share/miniconda/envs/test/lib/python3.7/site-packages/openmmforcefields/generators/system_generators.py", line 211, in __init__
    self.add_molecules(molecules)
  File "/usr/share/miniconda/envs/test/lib/python3.7/site-packages/openmmforcefields/generators/system_generators.py", line 238, in add_molecules
    self.template_generator.add_molecules(molecules)
  File "/usr/share/miniconda/envs/test/lib/python3.7/site-packages/openmmforcefields/generators/template_generators.py", line 124, in add_molecules
    self._molecules.update( { molecule.to_smiles() : molecule for molecule in molecules } )
  File "/usr/share/miniconda/envs/test/lib/python3.7/site-packages/openmmforcefields/generators/template_generators.py", line 124, in <dictcomp>
    self._molecules.update( { molecule.to_smiles() : molecule for molecule in molecules } )
  File "/usr/share/miniconda/envs/test/lib/python3.7/site-packages/openforcefield/topology/molecule.py", line 1841, in to_smiles
    smiles = to_smiles_method(self)
  File "/usr/share/miniconda/envs/test/lib/python3.7/site-packages/openforcefield/utils/toolkits.py", line 1032, in to_smiles
    oemol = OpenEyeToolkitWrapper.to_openeye(molecule)
  File "/usr/share/miniconda/envs/test/lib/python3.7/site-packages/openforcefield/utils/toolkits.py", line 934, in to_openeye
    'Programming error: OpenEye atom stereochemistry assumptions failed.'
Exception: Programming error: OpenEye atom stereochemistry assumptions failed.
hannahbrucemacdonald commented 3 years ago

I think openeye might need to be pinned to a 2019 version --- could you try and see if this prevents the issue?

jchodera commented 3 years ago

I think openeye might need to be pinned to a 2019 version

Wait, why? We definitely should not do this.

I think the issue is more likely that we need compatible openforcefield and openeye-toolkit versions. We should be using the latest version of each.