-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make offmol.smirnoff_impropers
and offmol.single_impropers
#746
Comments
The intended behavior here is hard to define. The word I see where you're going with the
Impropers are complicated because the only way to know how many of them will be defined is by consulting a ForceField. This means that no output from a Further, during parameterization, the way that we determine the three canonical orderings of a trefoil improper (as opposed to the six possible orderings) is by canonically ordering them according to their I could see two paths forward here:
|
I think the issue here is that .impropers returns a huge number of things to sort through, only a small number of which would ever be used by an Amber or SMIRNOFF force field. It seems like there's an easy way to prune down the list of impropers returned to a much smaller list that would still be more than would be assigned, but with a much less crazy overestimate, especially if we split .smirnoff_impropers (central atom is second atom) from .amber_impropers (central atom is first atom). |
Ok, that makes sense. Let me take a swing at a spec to add these:
I'm not sure which way to go on "all orderings of non-central atoms" but it seems better to return all orderings, since it'll be easier for users to prune these down than to permute them up. |
Thanks Jeff! That spec makes sense to me.
I'd also vote for returning all orderings, for the additional reasons that (1) this behavior is simpler to describe and verify than one that tries to canonicalize the ordering or return an arbitrary ordering, (2) this behavior is convenient to implement by |
Does this spec imply the removal of |
I'd vote for leaving as-is. If we're exposing other methods that provide the needed functionality then there's no pressure for an behavior change/API break. It's a silly method in its current form, but if someone out there is actually using it then there's no need to disrupt them. |
offmol.trefoil_impropers
and offmol.single_impropers
offmol.trefoil_impropers
and offmol.single_impropers
offmol.smirnoff_impropers
and offmol.single_impropers
I don't think this is true. Everywhere else I can find, and everything I have implemented, indicates that Amber expects the central atom to be listed third. |
Agreed. This confuses everyone about annually. Parmed impropers have the first atom as the central one only for harmonic improper dihedrals; it uses the third for periodic impropers. But because Amber can reverse them, I think it can also be second. |
Describe the bug
Not really a bug, possibly naive question about intended behavior in enumerating indices for improper torsions.
I was surprised at the large number of torsions included in
offmol.impropers
for some molecules (e.g.len(methane.impropers) == 24
).The way
offmol.impropers
are enumerated appears maximally permissive, in that it doesn't place a constraint on the connectivity or identity of the central atom (except that it must have connectivity of >= 3). I think it's equivalent to returning all chemical environment matches for the SMARTS pattern"[*:1]~[*:2](~[*:3])~[*:4]"
("a central atom and 3 tagged neighbors").Are there other constraints we wish to impose on the indices returned by
offmol.impropers
? For example, would it be desirable to impose a constraint that the connectivity of the central atom is exactly 3 ("[*:1]~[X3:2](~[*:3])~[*:4]"
)?To Reproduce
Output
Computing environment:
openforcefield==0.7.1
The text was updated successfully, but these errors were encountered: