fgrunewald / Martini_PolyPly

Tool for generating MARTINI Polymer itps and structures
GNU General Public License v3.0
15 stars 3 forks source link

Missing Atoms when using the internal block-copolymer function #11

Closed fgrunewald closed 6 years ago

fgrunewald commented 6 years ago

When using the following comment:

polyply -polymer A B -n_mon x y -o out.itp -name polymer -endgroup ./endgroup.itp -links linker.itp

The last atom from polymer type B is missing. This is probably related to using only one endgroup. The rest seems not to be affected. However, this should not happen.

fgrunewald commented 6 years ago

I should add the reverse so exchanging A for B works for some reason.

fgrunewald commented 6 years ago

This problem is related to the charge groups. In general charge groups are also counted forward such that two monomers for example would be two separate charge groups if they were in the input itp. However, when the charge group index exceeds the number of atoms, those charge groups are removed from the itp file.

fgrunewald commented 6 years ago

Since the number of charge groups cannot exceed the number of atoms I added a fatal error for this issue.