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

(protein) termini patching #374

Closed csbrasnett closed 4 days ago

csbrasnett commented 1 month ago

with the -ter flag, add modifications read from the force field to the n and c termini

pckroon commented 3 weeks ago

Since Vermouth generates a vermouth.molecule.Choice object you need to do the check using Choice.match. Calling @pckroon for some advise of comparing resnames using choice objects.

Use vermouth.molecule.attributes_match to compare node dictionaries. E.g. attributes_match(my_node, {'resname': Choice(['ALA', 'GLY']), 'resid': 23}. Note that all attributes specified in the second dictionary must be in the first dict (or have value None) and match. In the example that means that the dictionary my_node must have the attributes 'resname' and 'resid', and the resname must be either 'ALA' or 'GLY', and the resid must be 23.

csbrasnett commented 1 week ago

I think this addresses everything now, let me know your thoughts. One point of concern - when I was looking at doing a test for the final missing part of the codecov report, I can't see a 'from_itp' key in the node dictionary for the test molecules, even though they have been? Looking at meta_molecule.py I'm not sure how/where this is added anyway?