Skip to content

Charge generation is failing  #346

@nividic

Description

@nividic

Hi there,

I was trying to use generate an openmm system starting from a given molecule topology. I'm using the openforcefield v 0.3.0 on Mac Osx. Unfortunately, I was unsuccessful. The problem is related to the charge assignment. Here is the snippet code to reproduce the issue:

from openforcefield.topology import Molecule
from openforcefield.topology import Topology
from openforcefield.typing.engines.smirnoff import ForceField

oemol = oechem.OEMol()

with oechem.oemolistream("2799.oeb") as ifs:
    oechem.OEReadMolecule(ifs, oemol)

# This is a temporary bug fix for the bug #344 
oechem.OE3DToAtomStereo(oemol)
oechem.OE3DToBondStereo(oemol)

molecule = Molecule(oemol)

forcefield = ForceField('test_forcefields/smirnoff99Frosst.offxml')

topology = Topology.from_molecules(molecule)
system = forcefield.create_openmm_system(topology)

I'm getting the following error:

Warning: SelectElfPop: issue with removing trans COOH conformers
Warning: ElfPrepareMol: SelectElfPop failed
Warning: OEELFCharges: ELF preparation failed on mol DrugBank_2799.
Traceback (most recent call last):
File "conf.py", line 19, in
system = forcefield.create_openmm_system(topology)
File "/Users/gcalabro/local/miniconda3/envs/smirnoff_new/lib/python3.6/site-packages/openforcefield/typing/engines/smirnoff/forcefield.py", line 997, in create_openmm_system
parameter_handler.create_force(system, topology, **kwargs)
File "/Users/gcalabro/local/miniconda3/envs/smirnoff_new/lib/python3.6/site-packages/openforcefield/typing/engines/smirnoff/parameters.py", line 2255, in create_force
temp_mol.compute_partial_charges_am1bcc(toolkit_registry=toolkit_registry)
File "/Users/gcalabro/local/miniconda3/envs/smirnoff_new/lib/python3.6/site-packages/openforcefield/topology/molecule.py", line 1991, in compute_partial_charges_am1bcc
self
File "/Users/gcalabro/local/miniconda3/envs/smirnoff_new/lib/python3.6/site-packages/openforcefield/utils/toolkits.py", line 2964, in call
return method(*args, **kwargs)
File "/Users/gcalabro/local/miniconda3/envs/smirnoff_new/lib/python3.6/site-packages/openforcefield/utils/toolkits.py", line 1237, in compute_partial_charges_am1bcc
raise Exception('Unable to assign charges')
Exception: Unable to assign charges

I've attached the offending zipped molecule:

2799.oeb.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions