marrink-lab / polyply_1.0

Generate input parameters and coordinates for atomistic and coarse-grained simulations of polymers, ssDNA, and carbohydrates
Apache License 2.0
119 stars 21 forks source link

Raise better error in top-parser #338

Open BartBruininks opened 11 months ago

BartBruininks commented 11 months ago

Describe the bug Turorial brush lipids does not finish. Polyply 1.5.0.

polyply gen_coords -p system.top -o struct.gro -res PEO OHter -c bilayer_brush.gro -name test -box 8.0 8.0 33.0 -split POPE:HEAD-NH3:TAIL-PO4,GL1,GL2,C1A,D2A,C3A,C4A,C1B,C2B,C3B,C4B -b build_file.bld

yields the following output with an error:

polyply gen_coords -p system.top -o struct.gro -res PEO OHter -c bilayer.gro -name test -box 8.0 8.0 33.0 -split POPE:HEAD-NH3:TAIL-PO4,GL1,GL2,C1A,D2A,C3A,C4A,C1B,C2B,C3B,C4B -b build_file.bld
INFO - step - reading topology
INFO - step - processing topology
Traceback (most recent call last):
  File "/home/bart/.virtualenvs/containment/bin/polyply", line 258, in <module>
    main()
  File "/home/bart/.virtualenvs/containment/bin/polyply", line 254, in main
    subprogram(**args_dict)
  File "/home/bart/.virtualenvs/containment/lib/python3.8/site-packages/polyply/src/gen_coords.py", line 198, in gen_coords
    topology.preprocess()
  File "/home/bart/.virtualenvs/containment/lib/python3.8/site-packages/polyply/src/topology.py", line 238, in preprocess
    self.gen_pairs()
  File "/home/bart/.virtualenvs/containment/lib/python3.8/site-packages/polyply/src/topology.py", line 270, in gen_pairs
    comb_rule = comb_funcs[self.defaults["comb-rule"]]

Expected behavior The creation of the brush bilayer. I altered the name to just bilayer.gro as I did the mushroom and brush tutorial in separate folders.

Additional Files brush.zip

fgrunewald commented 11 months ago

@BartBruininks your topology file is incorrect. You forgot to include #include "martini-3/martini_v3.0.0.itp"

BartBruininks commented 11 months ago

You are completely right. Thanks for the quick response. All is working now.

fgrunewald commented 11 months ago

Let's keep this open, the top parser should raise a more legible error