planarity: torsions or PCA

21 views
Skip to first unread message

Andrey Poletayev

unread,
Oct 6, 2025, 3:29:09 PMOct 6
to PLUMED users
I am trying to create a CV that would characterize whether a group of atoms in a 3D simulation locally form a planar (2D) structure. In other words, how do we describe groups of atoms close to each other being planar or not? I see three-ish possible ways of doing it, but cannot seem to make any of them complete:
1. looking at torsion angles between all sets of four atoms in the group: they should be near-zero or near-pi, weighted by three pairwise distances between the four atoms in each TORSION as switches. This would be trivial if the TORSIONS action worked as ANGLES with a GROUP, but it does not, and it looks like ANGLES is set for deprecation anyway. It would be great to not have to manually specify all sets of four atoms: while it is possible to write a script to generate them by brute force, and then apply 3x distance switching functions, that seems too cumbersome and not vectorized to be the way to go about it; even a set of 10 atoms would have >2K torsions.
2. taking two top eigenvalues of a PCA of the positions; this is a bit confusing since the examples I have seen use PCA on displacements rather than on positions themselves
3. something with contact matrices, putting together 2x BOND_DIRECTIONS, which leaves only the third distance challenging to add because of indexing. In other words, if there are atoms 1,2,3,4 in a group, BOND_DIRECTIONS can give 2-1 weighted by relevant distance, 3-4 also weighted, but where the index of the 2-3 distance would be is unclear.

I would be grateful for any pointers or thoughts from folks here :) 

-Andrey

Gareth Tribello

unread,
Oct 6, 2025, 4:34:21 PMOct 6
to plumed...@googlegroups.com
Hello 

I would suggest using the smallest eigenvalue of the gyration tensor as a CV.  This quantity would be zero if all the atoms are in a plane.

The input would look something like this:

m: GYRATION ATOMS=<group of atoms> TYPE=GTPC_3 

You can read more about this command here:



I hope this helps

Gareth

--
You received this message because you are subscribed to the Google Groups "PLUMED users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plumed-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/plumed-users/d9bd4a34-f3e2-4a02-97ad-31dc4f46e486n%40googlegroups.com.

Andrey Poletayev

unread,
Oct 7, 2025, 8:00:42 AMOct 7
to plumed...@googlegroups.com
Ah, of course! Thank you so much for the pointer! Shows you who is not a biologist (me!), doesn't it? 

Andrey

You received this message because you are subscribed to a topic in the Google Groups "PLUMED users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/plumed-users/pugW2AP2EgQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to plumed-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/plumed-users/84E829ED-A8E8-4A01-BFF0-DE77A30BD4AF%40gmail.com.
favicon.png
Reply all
Reply to author
Forward
0 new messages