normal problem with do_order for POPC

  • Rajat Desikan
  • Rajat Desikan's Avatar Topic Author
  • Offline
  • Expert Boarder
More
11 years 8 months ago - 11 years 8 months ago #1088 by Rajat Desikan
problem with do_order for POPC was created by Rajat Desikan
Hi,
I want to calculate the order parameter of a 560 lipid POPC bilayer simulated for 30 ns and oriented along the y-axis. I issued the following command.

./do-order.py 0 30000 10 0 1 0 560 POPC


I obtained the following error.

Will write gro: Coordinate file in Gromos-87 format
Reading file topol.tpr, VERSION 4.5.5 (single precision)
Reading file topol.tpr, VERSION 4.5.5 (single precision)
Select group for output
Group 0 ( System) has 11200 elements
Group 1 ( Other) has 11200 elements
Group 2 ( POPC) has 7280 elements
Group 3 ( W) has 3920 elements
Select a group: Selected 1: 'Other' - HOW DO I MAKE IT SELECT GROUP 2
Reading frame 0 time 0.000
Precision of traj.xtc is 0.001 (nm)
Using output precision of 0.001 (nm)

Dumping frame at t= 0 ps
Reading frame 1 time 20.000

gcq#158: "I Am a Wonderful Thing" (Kid Creole)

Traceback (most recent call last):
File "./do-order.py", line 130, in <module>
first, second = read_gro(filename, bond)
File "./do-order.py", line 16, in read_gro
for line in open(file):
IOError: [Errno 2] No such file or directory: 'dump_0ns.gro'

Please help!

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago #1091 by djurre
Replied by djurre on topic problem with do_order for POPC
You can change the python code. Open do_order.py, go to line 116 and change the echo.

Please Log in or Create an account to join the conversation.

  • Rajat Desikan
  • Rajat Desikan's Avatar Topic Author
  • Offline
  • Expert Boarder
More
11 years 8 months ago #1092 by Rajat Desikan
Replied by Rajat Desikan on topic problem with do_order for POPC
Thanks Djurre, I did that. Now I am getting the following error

Will write gro: Coordinate file in Gromos-87 format
Reading file topol.tpr, VERSION 4.5.5 (single precision)
Reading file topol.tpr, VERSION 4.5.5 (single precision)
Select group for output
Group 0 ( System) has 11200 elements
Group 1 ( Other) has 11200 elements
Group 2 ( POPC) has 7280 elements
Group 3 ( W) has 3920 elements
Select a group: Selected 2: 'POPC'
Reading frame 0 time 0.000
Precision of traj.xtc is 0.001 (nm)
Using output precision of 0.001 (nm)

Back Off! I just backed up dump_0ns.gro to ./#dump_0ns.gro.1#

Dumping frame at t= 0 ps
Reading frame 1 time 20.000

gcq#127: "It's Not Your Fault" (Pulp Fiction)

Traceback (most recent call last):
File "./do-order.py", line 138, in <module>
vector[j] = first[j] - second[j]
IndexError: list index out of range

How do I go about this?

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago #1094 by djurre
Replied by djurre on topic problem with do_order for POPC
At least the gromacs quote was right:-)

The problem is that the script is slightly sloppy written, because it uses the depreceated python call "system()". For me it worked by replacing line 116:

system("echo 1 | trjconv -dump %i -quiet -o %s &> /dev/null" % (time, filename))

by these four lines (note that there are probably extra linebreaks in the code you see):

import subprocess as sp
p = sp.Popen(("trjconv -dump %i -o %s"%(time,filename)).split(),stderr=sp.PIPE,stdout=sp.PIPE,stdin=sp.PIPE)
p.stdin.write('%sn'%1)
p.wait()

All should have the same indentation as the original line. It would ofcourse be faster to have the import statement at the top of the script with the other import statements.

I don't know why it hasn't given problems before. We should put a fixed version online at some point.

Please Log in or Create an account to join the conversation.

  • Rajat Desikan
  • Rajat Desikan's Avatar Topic Author
  • Offline
  • Expert Boarder
More
11 years 8 months ago #1096 by Rajat Desikan
Replied by Rajat Desikan on topic problem with do_order for POPC
Hi Djurre,
Sorry for the delay in replying.
I replaced line 16 by the lines you had posted. I now get the following error.

Traceback (most recent call last):
File "./do-order.py", line 134, in <module>
first, second = read_gro(filename, bond)
File "./do-order.py", line 16, in read_gro
for line in open(file):
IOError: [Errno 2] No such file or directory: 'dump_0ns.gro'


How do I go about this? I am python ignorant...

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago #1099 by djurre
Replied by djurre on topic problem with do_order for POPC
It is hard to say what goes wrong. Is your trajectory called traj.xtc (that is was do-order.py assumes) ? Can you run "trjconv -dump 0 -o dump_0ns.gro" on your trajectory?

Please Log in or Create an account to join the conversation.

  • Rajat Desikan
  • Rajat Desikan's Avatar Topic Author
  • Offline
  • Expert Boarder
More
11 years 8 months ago #1102 by Rajat Desikan
Replied by Rajat Desikan on topic problem with do_order for POPC
oops, I had made a spelling error in topol.tpr (named it tppol.tpr). "trjconv -dump 0 -o dump_0ns.gro" works perfectly fine.

Now I am getting the following error

time NC3-PO4 PO4-GL1 GL1-GL2 GL1-C1A GL2-C1B C1A-C2A C2A-C3A D3A-C4A C1B-C2B C2B-D3B D3B-C4B C4B-C5B

Traceback (most recent call last):
File "./do-order.py", line 142, in <module>
vector[j] = first[j] - second[j]
IndexError: list index out of range
[/b]

Thanks a lot Djurre

Please Log in or Create an account to join the conversation.

  • Rajat Desikan
  • Rajat Desikan's Avatar Topic Author
  • Offline
  • Expert Boarder
More
11 years 7 months ago #1109 by Rajat Desikan
Replied by Rajat Desikan on topic problem with do_order for POPC
Hi guys.
Sorry to disturb you. Can I have some help on this do-order.py script?
Thanks

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #1120 by helgi
Replied by helgi on topic problem with do_order for POPC
Hello, hello,
I just uploaded a modified do-order script to the MARTINI site
md.chem.rug.nl/cgmartini/index.php/downloads/tools

This one starts by outputting all the snapshots, before calculating the P2. It should therefore be much faster and not have the same problems with incomplete files before calculating as you had before (but needs much more disk space).

For this one your input need to be altered, something like:
./do-order-multi.py traj.xtc 0 30000 50 0 1 0 560 POPC

And now the x4 argument is the -skip in trjconv, so 50 means analyze every 50th frame in your .xtc file.

Hope this one works for you,
Please let us know if you have any problems with it,
Cheers,
- Helgi

Please Log in or Create an account to join the conversation.

  • Rajat Desikan
  • Rajat Desikan's Avatar Topic Author
  • Offline
  • Expert Boarder
More
11 years 6 months ago #1189 by Rajat Desikan
Replied by Rajat Desikan on topic problem with do_order for POPC
Hi Helgi
I tried your new script on a DMPC bilayer. It works like a charm. Thanks.
Sorry for the long hiatus. Thanks to everyone.

Please Log in or Create an account to join the conversation.

Time to create page: 0.183 seconds