Open pckroon opened 3 years ago
Being dumber makes writing links a real pain. I would go for the warning. It also highlights the need for a linter.
Jup. Alternative: have the behaviour defined by the sections, and don't translate dihedrals with function type 2 to impropers (for which no bonds are made). I.e. the [dihedrals] section makes bonds, but the [impropers] section does not (or different bonds).
That is an option indeed. It will trip users who copy interactions from an ITP file, though. This is to be kept in mind.
When writing links, you could do e.g.
which appears sane. But SURPRISE! This will never match your molecule, since the link is disconnected: There is no edge from +BB to +BB1. This is because the dihedral is actually an improper dihedral, and we don't guess the edges for that (see
vermouth.molecule::Block.make_edges_from_interactions
).The quick-fix is to issue warning for disconnected items in the Forcefield (Links, blocks, modifications, ...) at the end of parsing. A better solution might be to be smarter about guessing edges (or dumber, so that the expectation is not there?)