How to visualize the trjactory generated by NWChem

From NWChem

Viewed 4786 times, With a total of 6 Posts
Jump to: navigation, search

Clicked A Few Times
Threads 12
Posts 43
Hi everyone,

I am fresh in NWChem and have performed some MD simulations. My experience is that NWChem is a good program but hard to study. There is little course to follow. Using ANALYSIS module, I try to convert the .trj file to .dcd or .crd file, but the job failed. So My question is how to visualize the trajectory generated by NWChem?

I wish get some suggestions from you, thanks.

Jingbo

  • Bert Forum:Admin, Forum:Mod, NWChemDeveloper, bureaucrat, sysop
    Profile
    Send PM
Forum Vet
Threads 4
Posts 597
Can you provide your input for the analysis module, and also the error you are observing.

Bert

Quote:Wjb0920 Sep 5th 1:03 am
Hi everyone,

I am fresh in NWChem and have performed some MD simulations. My experience is that NWChem is a good program but hard to study. There is little course to follow. Using ANALYSIS module, I try to convert the .trj file to .dcd or .crd file, but the job failed. So My question is how to visualize the trajectory generated by NWChem?

I wish get some suggestions from you, thanks.

Jingbo

Clicked A Few Times
Threads 12
Posts 43
corruption or unrecognized file structure
Hi bert,

Thanks for your reply, I turned to other aspects some times and now turn back to study NWChem, particularly on QMMM.

Now, I can run the "task analysis" job successfully using NWChem-6.1.1, the input is following:
analysis
system NaK_md
file NaK_md.trj
frames 20
copy NaK_md.dcd
end

Here NaK_md.trj is generated by NWChem after MD simulation. I want to use VMD-1.9 to display NaK_md.dcd. When loading it into VMD, the error message is:

dcdplugin> detected standard 32-bit DCD file of native endianness
dcdplugin> CHARMM format DCD file <also NAMD 2.1 and later>
dcdplugin> Warning: DCD header claims 20 frames, file size indicates there are acutally 39 frames
Info> Using plugin dcd for coordinates from file D:/nwchem/NaK_md.dcd
dcdplugin> read_dcdstep: corruption or unrecognized file structure
Info> Finished with coordinate file D:/nwchem/NaK_md.dcd

I cannot viualize the trajectory generated by NWChem, could you provide me some suggestions, thank you very much.

Jingbo

Clicked A Few Times
Threads 12
Posts 43
other example get the same results
ps: In addition to above NaK example, I also try top7 example, also get the same results. VMD dcdplugin tends to double the frames, which means, if I specify "frames 10" in analysis model, then dcdplugin will print:
dcdplugin> Warning: DCD header claims 10 frames, file size indicates there are acutally 19 frames

any suggestion is appreciated, thanks.

Jingbo

Just Got Here
Threads 0
Posts 2
I gave up trying to launch properly ECCE and parsing trj files directly frame by frame. Instead I saved output of MD from terminal to file. It contains blocks of XYZ coordinates of atoms repeating with constant periodicity. Just a few lines in python to clean the garbage worked for me.

Clicked A Few Times
Threads 12
Posts 43
the details of your method
Quote:Nfrik Nov 3rd 2:57 am
I gave up trying to launch properly ECCE and parsing trj files directly frame by frame. Instead I saved output of MD from terminal to file. It contains blocks of XYZ coordinates of atoms repeating with constant periodicity. Just a few lines in python to clean the garbage worked for me.


Dear Nfrik,

Could you tell me the details about you method? I have 3 questions:
1. How to parsing trj files frame by frame? I am appreciated if you can provide input file to me.
2. What is the output of MD from terminal? While MD is running, NWchem writing several files, it seems no output about coordinates information from terminal.
3. Could you provide your python script to me and to the community.

Thank you very much.

Best,

Jingbo
Edited On 3:35:31 AM PST - Wed, Nov 13th 2013 by Wjb0920

Just Got Here
Threads 0
Posts 2
If it is not too late here is the python code for extracting coordinate files from molecular dynamics simulation containing 32 atoms:
the program opens log file mpirunlogtrim.txt
and outputs coordinates to mpirunlogtrim.xyz frame by frame readable in VMD

%----------------------------------------------
from numpy import *
import numpy as np

file = open('./mpirunlogtrim.txt');

elems=0;
fctr=0;
elctr=0;
data = file.readlines();
file.close();

elems=32;
elem=[]*elems;
  1. read elements list
for n in range(0,elems):
   elem[n]=data[n+2].rsplit()[1];
print elem[n]

incr=0;
filew=open('./mpirunlogtrim.xyz','w');
readnext=1;
pos=2;
while readnext:
  filew.write(str(elems)+'\n');
filew.write('Dynamics at 500 K'+'\n');
for n in range(0,elems):
list_of_el=list(data[n+pos].rsplit());
filew.write(.join(format(el,'<15') for el in list_of_el[1:5])+'\n');
incr+=1;
pos+=elems+31;

if pos+1>len(data):
readnext=0;

filew.close();
%---------------------------------------------------------


Forum >> NWChem's corner >> Running NWChem



Who's here now Members 0 Guests 1 Bots/Crawler 0


AWC's: 2.5.10 MediaWiki - Stand Alone Forum Extension
Forum theme style by: AWC