confused distance units when processing xyz file with plumed driver

9 views
Skip to first unread message

Qinghua Liao

unread,
Feb 2, 2026, 12:05:12 PM (3 days ago) Feb 2
to PLUMED users
Hello, 

I found that the distances obtained from plumed driver
with xyz file are wrong, or the units (angstrom, nm) got mixed.

For example, I tried to calculate some C-C and C-O bond length on a sugar ring. 
If I explicitly put "LENGTH=A" in the plumed input file, the obtained values are 10 times of the real ones.
#
#! FIELDS time d1 d2 d3 d4 d5 d6
 0.000000 14.337019 15.193084 15.133453 15.097632 15.208580 14.360783
 1.000000 13.713724 15.654379 15.476796 15.016462 15.531330 14.744635
#
If I remove the keyword, the default unit is nm, still, the obtained values are 10 times of the real ones.
#
#! FIELDS time d1 d2 d3 d4 d5 d6
 0.000000 1.433702 1.519308 1.513345 1.509763 1.520858 1.436078
 1.000000 1.371372 1.565438 1.547680 1.501646 1.553133 1.474463
#
my command is: 
plumed driver --plumed plumed_dists.dat --ixyz test.xyz --box 0,0,0 (tried 100,100,100)

I tried --length-units A (removing UNITS in the input) on the command line, then the obtained values are 1/10 of the real ones, if I use  --length-units nm, the obtained values are 10 times of the real ones. 

my molecule is in gas phase, and I tried both plumed 2.8.0 and 2.9.0. 

All the best,
Qinghua

Giovanni Bussi

unread,
Feb 2, 2026, 12:16:25 PM (3 days ago) Feb 2
to plumed...@googlegroups.com
Hello,

the LENGTH=A in the input files tells that you want to write distances in A. Plumed will still assume that test.xyz is written in nm.

If you want to tell Plumed that text.xyz is written in A, use the flag "--length-units A" on the command line

Giovanni


--
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/4f3f98cf-bcb6-4b52-9e9b-0945078555cdn%40googlegroups.com.

Qinghua Liao

unread,
Feb 2, 2026, 12:24:21 PM (3 days ago) Feb 2
to PLUMED users
Thanks Prof. Bussi! Now I get it. 

All the best,
Qinghua
Reply all
Reply to author
Forward
0 new messages