Skip to content

Packmol wrapper chokes on amino acids because of MDTraj-written PDB files #699

@lilyminium

Description

@lilyminium

Describe the bug

If a property includes a molecule that is a recognisable amino acid, this will get named as such in Packmol. When that happens, the parameter assignment step fails at the Topology.from_openmm call. This is in the Equilibration workflow. Highly related to #691.

To Reproduce

Try to equilibrate the property in the attached CSV with this script.

issue-699.csv

Output

JSON file:

0cfeef75228241b0bfe095a1798139dd/dens_2059314443383903998_assign_parameters/dens_2059314443383903998|assign_parameters_output.json:{"message": ["Traceback (most recent call last):\n", "  File \"/data/homezvol3/lilyw7/miniforge3/envs/evaluator-050/lib/python3.11/site-packages/openff/evaluator/workflow/protocols.py\", line 1201, in _execute_protocol\n    protocol.execute(directory, available_resources)\n", "  File \"/data/homezvol3/lilyw7/miniforge3/envs/evaluator-050/lib/python3.11/site-packages/openff/evaluator/workflow/protocols.py\", line 688, in execute\n    self._execute(directory, available_resources)\n", "  File \"/data/homezvol3/lilyw7/miniforge3/envs/evaluator-050/lib/python3.11/site-packages/openff/evaluator/protocols/forcefield.py\", line 563, in _execute\n    topology = Topology.from_openmm(\n               ^^^^^^^^^^^^^^^^^^^^^\n", "  File \"/data/homezvol3/lilyw7/miniforge3/envs/evaluator-050/lib/python3.11/site-packages/openff/utilities/utilities.py\", line 81, in wrapper\n    return function(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^\n", "  File \"/data/homezvol3/lilyw7/miniforge3/envs/evaluator-050/lib/python3.11/site-packages/openff/toolkit/topology/topology.py\", line 1495, in from_openmm\n    raise ValueError(msg)\n", "ValueError: No match found for molecule C. This would be a very unusual molecule to try and parameterize, and it is likely that the data source it was read from does not contain connectivity information. If this molecule is coming from PDB, please ensure that the file contains CONECT records. The PDB format documentation (https://www.wwpdb.org/documentation/file-format-content/format33/sect10.html) states \"CONECT records are mandatory for HET groups (excluding water) and for other bonds not specified in the standard residue connectivity table.\"\n"], "protocol_id": "dens_2059314443383903998|assign_parameters", "@type": "openff.evaluator.workflow.exceptions.WorkflowException"}

Printed with formatting:

Traceback (most recent call last):
  File "/data/homezvol3/lilyw7/miniforge3/envs/evaluator-050/lib/python3.11/site-packages/openff/evaluator/workflow/protocols.py", line 1201, in _execute_protocol
    protocol.execute(directory, available_resources)
  File "/data/homezvol3/lilyw7/miniforge3/envs/evaluator-050/lib/python3.11/site-packages/openff/evaluator/workflow/protocols.py", line 688, in execute
    self._execute(directory, available_resources)
  File "/data/homezvol3/lilyw7/miniforge3/envs/evaluator-050/lib/python3.11/site-packages/openff/evaluator/protocols/forcefield.py", line 563, in _execute
    topology = Topology.from_openmm(
               ^^^^^^^^^^^^^^^^^^^^^
  File "/data/homezvol3/lilyw7/miniforge3/envs/evaluator-050/lib/python3.11/site-packages/openff/utilities/utilities.py", line 81, in wrapper
    return function(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/homezvol3/lilyw7/miniforge3/envs/evaluator-050/lib/python3.11/site-packages/openff/toolkit/topology/topology.py", line 1495, in from_openmm
    raise ValueError(msg)
ValueError: No match found for molecule C. This would be a very unusual molecule to try and parameterize, and it is likely that the data source it was read from does not contain connectivity information. If this molecule is coming from PDB, please ensure that the file contains CONECT records. The PDB format documentation (https://www.wwpdb.org/documentation/file-format-content/format33/sect10.html) states "CONECT records are mandatory for HET groups (excluding water) and for other bonds not specified in the standard residue connectivity table."

Computing environment (please complete the following information):

  • Operating system
  • Output of running conda list

Additional context

Culprit PDB (output.pdb from Packmol):

issue-699.pdb

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions