marrink-lab / vermouth-martinize

Describe and apply transformation on molecular structures and topologies
Apache License 2.0
84 stars 37 forks source link

Issue with new MDTraj -dssp flag #573

Closed KasperBuskPedersen closed 4 months ago

KasperBuskPedersen commented 4 months ago

Hi I get the following error when running the new -dssp flag in v0.10

Traceback (most recent call last):
  File "/software/python3/environments/defenv/bin/martinize2", line 1114, in <module>
    entry()
  File "/software/python3/environments/defenv/bin/martinize2", line 1085, in entry
    write_gmx_topology(system,
  File "/software/python3/environments/defenv/lib/python3.8/site-packages/vermouth/gmx/topology.py", line 193, in write_gmx_topology
    cite_string = citation_formatter(molecule.force_field.citations[citation])
KeyError: 'MDTraj'

Printing molecule.force_field.citations out, the dictionary is empty. I cannot find any citation database in my vermouth package folder. I was able to run martinize2 by commenting out line 192-195 in gmx/topology.py

Best Kasper

pckroon commented 4 months ago

I'm going to state that you are using your own force field. Unfortunately citations are (currently) defined by and bound to force fields. Therefor, every force field needs to define the MDTraj citation in its citations.bib. See for example: https://github.com/marrink-lab/vermouth-martinize/blob/master/vermouth/data/force_fields/martini3001/citations.bib#L21

KasperBuskPedersen commented 4 months ago

@Lp0lp need to include this

pckroon commented 4 months ago

I mean, ideally someone would add functionality to add additional citations to the vermouth/data folder, rather than to just force fields. But time.