I am doing simulatons of polymer. I like to write the results of gyration.
In version of Jan 2009, we can use fix 1 mol1 gyration 1000 gyration.out, and save them in file of gyration.out.
When i use the version of Jan 2010, i found that i should use command as compute 1 mol1 gyration.
However, how can i save the results of gyration as a separate file for gyration (such as gyration.out in fix command )?
I was just playing with this so I will relay what I found:
Now that gyration is a compute, you need some other command to actually call the compute and then print it out. One is fix ave/time, which does let you specify a filename to print to.
The new version has the convenient compute “gyration/molecule”, so if your polymers each have their own molecule ID (as opposed to having the molecule id actually be the index along the chain or something), you don’t need a separate group for each polymer, you can just pass it the whole polymer group and it will calculate the Rg of each molecule, for example:
compute calcrg poly gyration/molecule
fix outrg poly ave/time 500 1 500 c_calcrg mode vector file allrg.dat
Or, if you like to use gyration, you can do, for each molecule individually:
compute calcrg1 molecule1 gyration
fix outrg1 molecule1 ave/time 500 1 500 c_calcrg1 file rg1.dat
It works now.
Thanks so much