Topic Options
#37169 - 10/07/18 02:49 AM write center of mass of selected atoms to file
Anupam Offline
Forum Member

Registered: 07/01/15
Posts: 7
I have been unsuccessfully trying to do something which seems rather trivial: I want to write, to a single formatted file, the center of mass positions (xCM, yCM, zCM) of multiple atom selections. I know how to do this for a time series using correl/enter but is there a way to do this for a single structure file? I tried a few ways using COOR STAT but without success. Any help will be appreciated, thanks!
_________________________
Anupam Chatterjee
Graduate Student
UC Irvine

Top
#37170 - 10/07/18 02:57 AM Re: write center of mass of selected atoms to file [Re: Anupam]
Anupam Offline
Forum Member

Registered: 07/01/15
Posts: 7
Never mind, I just figured it out. For future reference, this is what I used, where s and t are loop variables:

open unit 10 card name COMpositions.txt

---begin loop here
coor stat sele bynum @{s}:@{t} end mass
echu 10
echo ?xave ?yave ?zave
----continue loop
_________________________
Anupam Chatterjee
Graduate Student
UC Irvine

Top

Moderator:  John Legato, lennart