Open pckroon opened 1 week ago
Alright, that is a problem, since the modification mappings are known. I'll dig a bit
It currently produces the following errors:
ERROR - general - The following atoms do not have a atype: [
{'PTM_atom': True, 'element': 'H', 'replace': {'atomname': 'HN2'}, 'order': 0, 'atomname': 'HN2', 'modifications': [<Modification "N-ter" at 0x7fc99e8a1910>, <Modification "('N-ter',)" at 0x7fc99880fe10>], 'graph': <vermouth.molecule.Molecule object at 0x7fc997a91890>, 'mapping_weights': {607: 1}, 'resname': 'MET', 'chain': 'A', 'resid': 1, '_old_resid': 1, 'position': array([nan, nan, nan])},
{'PTM_atom': True, 'element': 'H', 'replace': {'atomname': 'HN3'}, 'order': 0, 'atomname': 'HN3', 'modifications': [<Modification "N-ter" at 0x7fc99e8a1910>, <Modification "('N-ter',)" at 0x7fc99880fe10>], 'graph': <vermouth.molecule.Molecule object at 0x7fc997a91b10>, 'mapping_weights': {610: 1}, 'resname': 'MET', 'chain': 'A', 'resid': 1, '_old_resid': 1, 'position': array([nan, nan, nan])},
{'PTM_atom': True, 'element': 'O', 'order': 0, 'atomname': 'OXT', 'modifications': [<Modification "C-ter" at 0x7fc99e898850>, <Modification "('C-ter',)" at 0x7fc99880e710>], 'graph': <vermouth.molecule.Molecule object at 0x7fc997a91650>, 'mapping_weights': {601: 1}, 'resname': 'GLY', 'chain': 'A', 'resid': 76, '_old_resid': 76, 'position': array([4.0862, 3.9575, 3.6251])}]
ERROR - general - The following atoms do not have a charge_group: [
{'PTM_atom': True, 'element': 'H', 'replace': {'atomname': 'HN2'}, 'order': 0, 'atomname': 'HN2', 'modifications': [<Modification "N-ter" at 0x7fc99e8a1910>, <Modification "('N-ter',)" at 0x7fc99880fe10>], 'graph': <vermouth.molecule.Molecule object at 0x7fc997a91890>, 'mapping_weights': {607: 1}, 'resname': 'MET', 'chain': 'A', 'resid': 1, '_old_resid': 1, 'position': array([nan, nan, nan])},
{'PTM_atom': True, 'element': 'H', 'replace': {'atomname': 'HN3'}, 'order': 0, 'atomname': 'HN3', 'modifications': [<Modification "N-ter" at 0x7fc99e8a1910>, <Modification "('N-ter',)" at 0x7fc99880fe10>], 'graph': <vermouth.molecule.Molecule object at 0x7fc997a91b10>, 'mapping_weights': {610: 1}, 'resname': 'MET', 'chain': 'A', 'resid': 1, '_old_resid': 1, 'position': array([nan, nan, nan])},
{'PTM_atom': True, 'element': 'O', 'order': 0, 'atomname': 'OXT', 'modifications': [<Modification "C-ter" at 0x7fc99e898850>, <Modification "('C-ter',)" at 0x7fc99880e710>], 'graph': <vermouth.molecule.Molecule object at 0x7fc997a91650>, 'mapping_weights': {601: 1}, 'resname': 'GLY', 'chain': 'A', 'resid': 76, '_old_resid': 76, 'position': array([4.0862, 3.9575, 3.6251])}]
The missing atype
is a data issue on the modifications; and the missing charge_group
is probably an issue with the mapping processor (which makes me very sad).
Also note that some of these atoms have nan-positions
Alright, this should fix most of the mess, at least regarding charge groups. The AA modifications are still missing some critical data, such as charge and atom types. I don't have the time to fix the patch test coverage
But I assume you tested this? Perhaps worth to add an integration test instead of patching the code coverage with unit tests
I tested this roughly (make an atomistic 1ubq, see if the resulting itp looks mostly reasonable by staring at it). If/when you have modifications with appropriate parameters I'd be happy to run it again, check it more thoroughly, and add that as integration test.
@pckroon we're almost there just one ingredient missing: we need to patch the rtp paser to generate all missing dihedrals and pairs
do you want to take a stab at it? I'm not saying a complete rewrite just patch
Doesn't https://github.com/marrink-lab/vermouth-martinize/blob/master/vermouth/gmx/rtp.py#L257 already generate all the dihedrals? (Should, anyway). About the pairs, are those the ones meant by "TODO: generate 1-4 interactions between pairs of hydrogen atoms"?
for lysozyme I'm missing like 4000 dihedrals, all angles, and a bunch of bonds. I think Jon just makes the dihedrals for links? Also for charmm cmaps are missing
@pckroon this seems to cause a flood of warnings: