saving Q6 order parameter value per atom.

73 views
Skip to first unread message

Sankalp Eknath Jadhav (P22CY009)

unread,
Feb 10, 2025, 6:57:58 AM2/10/25
to PLUMED users
Hello,
I want to save per atom q6 values. i searched for it but i didn,t found the answer. i am using the trajectory consist of oxygen only

# Calculate Q6 for each atom individually
q6: Q6 SPECIES=1-2000 SWITCH={RATIONAL R_0=0.35 D_0=0 NN=50 MM=100} MEAN      
# Print Q6 values for each atom
PRINT ARG=q6.* FILE=q6_values.dat STRIDE=1

this gives only single averaged value over all atoms
i want each atom value
can someone please help with this?


Gareth Tribello

unread,
Feb 10, 2025, 7:07:58 AM2/10/25
to plumed...@googlegroups.com
Hello

If you update to version 2.10 of plumed you can do this with:

q6: Q6 SPECIES=1-2000 SWITCH={RATIONAL R_0=0.35 D_0=0 NN=50 MM=100} 
PRINT ARG=q6 FILE=q6_values.dat STRIDE=1

Or perhaps more usefully:

q6: Q6 SPECIES=1-2000 SWITCH={RATIONAL R_0=0.35 D_0=0 NN=50 MM=100} 
DUMPXYZ ATOMS=q6 ARG=q6 FILE=q6_data.xyz STRIDE=1

This second one will output an xyz file with 5 columns per atom.  The first column is the atom symbol (actually just an x), the next three columns are the x, y and z components of the position of the atom and the last column is the q6 value for the atom at that position.

I hope this helps
Gareth

PS
You can find better documentation for the implementation of Q6 in version 2.10 here:

--
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/54b75e00-e14c-4fd0-a5a0-0a1f48f2e243n%40googlegroups.com.

Sankalp Eknath Jadhav (P22CY009)

unread,
Feb 13, 2025, 1:14:15 AM2/13/25
to PLUMED users
Hello Gareth,
Thanks for the quick response. I installed plumed-2.10b and I am able to save the Q6 values per atom. I am facing one error where my script runs for less number of atoms (around 5000) but it gives segmentation fault error for bigger system (around 80000 atoms). Is there any way to tackle the issue ?

Gareth Tribello

unread,
Feb 13, 2025, 2:58:05 AM2/13/25
to plumed...@googlegroups.com
Hello 

Use the D_MAX parameter in your switching function definitions like this:

q6: Q6 SPECIES=1-2000 SWITCH={RATIONAL R_0=0.35 D_0=0 NN=50 MM=100 D_MAX=1.0} 

I am not saying you should use this with the value of 1.0 (you can probably set it smaller).  D_MAX is a value you choose beyond which the switching function is so close to zero that you can safely assume it is zero.  To work out what value to choose for this parameter you should plot the switching function and use the plot to make an informed choice about the value of D_MAX.

I hope this helps
Gareth

Sankalp Eknath Jadhav (P22CY009)

unread,
Feb 21, 2025, 6:50:14 AM2/21/25
to PLUMED users
Hello,
Thank you for the response. My analysis ran after using D_MAX. I decided D_MAX=0.42 after plotting the switch function and also made sure that the D_MAX cutoff didn't affect the OP value significantly. 
Thanks again
Sankalp Jadhav
Reply all
Reply to author
Forward
0 new messages