Re: [gmx-users] Making Commands Non-Interactive

2009-10-05 Thread Alexander Bujotzek
I once wrote some lines of adventurous C-code to get an observable of
choice from g_energy without typing the observable index myself... this
may also be applied to trjconv I think.

string genergyCall = g_energy -f  + myEdrFile +  -o  + myXvgFile + 
 /dev/null;
string energyObs = 8; // e.g. potential

FILE *fpipe;
fpipe = popen(genergyCall.c_str(),w);
fwrite(energyObs.data(), 1, 1, fpipe); // tell g_energy what to write
pclose(fpipe);

If you want to pipe more stuff to the program you are calling, the buffer
size of fwrite has to be increased.
So you might put this into a minimal C-program and start that
non-interactive with qsub or whatever.


 Dear GMX Users,

 I ask this question in this mailing list since probably a user have
 already encountered this similar problem. I would like to  post-process my
 trajectory with the command trjconv (in mpi mode). For this I use the
 following shell command:

 echo 0 | /usr/pbs/bin/mpiexec /scratch/name/gromacs-4.0.5/bin/trjconv_mpi
 -s Peptide_43A1_topol.tpr -f ./XTC/Whole_Traj_43A1.xtc -o
 ./XTC/Whole_Traj_43A1noPBC.xtc -pbc mol -ur compact. With the selection 0
 (System)

 It works but since my simulations is very long ( 300ns) the command stops
 in the middle of the trajectory before to finish the process ( i suspect a
 time limit for using the interactive mode). So i would like to use a
 script to do the task. How to pass the choice 0 in the script (i.e.
 equivalent to the echo 0). I use a bash shell and the command qsub to
 launch a mpi job.

 I have tried to adapt the examples available in the GMX website with a
 text file as suggested by the author in GROMACS site with no success.

 Thank you again for your help

 ___
 gmx-users mailing listgmx-users@gromacs.org
 http://lists.gromacs.org/mailman/listinfo/gmx-users
 Please search the archive at http://www.gromacs.org/search before posting!
 Please don't post (un)subscribe requests to the list. Use the
 www interface or send it to gmx-users-requ...@gromacs.org.
 Can't post? Read http://www.gromacs.org/mailing_lists/users.php


-- 
Alexander Bujotzek
Zuse Institute Berlin
Computational Drug Design Group
Tel. : +49 30 84185-234
eMail: bujot...@zib.de
___
gmx-users mailing listgmx-users@gromacs.org
http://lists.gromacs.org/mailman/listinfo/gmx-users
Please search the archive at http://www.gromacs.org/search before posting!
Please don't post (un)subscribe requests to the list. Use the 
www interface or send it to gmx-users-requ...@gromacs.org.
Can't post? Read http://www.gromacs.org/mailing_lists/users.php


Re: [gmx-users] Making Commands Non-Interactive

2009-10-05 Thread Omer Markovitch
Have you tried:
echo 0  zero
trjconv bla bla bla  zero
You could put more arguments in the file, for example - use the -center
option, and then echo another 0 into the zero file.
--Omer.

On Sun, Oct 4, 2009 at 18:22, ABEL Stephane 175950 stephane.a...@cea.frwrote:

 Dear GMX Users,

 echo 0 | /usr/pbs/bin/mpiexec /scratch/name/gromacs-4.0.5/bin/trjconv_mpi
 -s Peptide_43A1_topol.tpr -f ./XTC/Whole_Traj_43A1.xtc -o
 ./XTC/Whole_Traj_43A1noPBC.xtc -pbc mol -ur compact. With the selection 0
 (System)


___
gmx-users mailing listgmx-users@gromacs.org
http://lists.gromacs.org/mailman/listinfo/gmx-users
Please search the archive at http://www.gromacs.org/search before posting!
Please don't post (un)subscribe requests to the list. Use the 
www interface or send it to gmx-users-requ...@gromacs.org.
Can't post? Read http://www.gromacs.org/mailing_lists/users.php

Re: [gmx-users] Making Commands Non-Interactive

2009-10-05 Thread Tsjerk Wassenaar
Cool. You can also write a python script to generate and execute your
C-code, which you then wrap with Java to be executed through Ruby...
etc. Erik, can you maybe give the assembly solution?

:p

Tsjerk

On Mon, Oct 5, 2009 at 10:15 AM, Alexander Bujotzek bujot...@zib.de wrote:
 I once wrote some lines of adventurous C-code to get an observable of
 choice from g_energy without typing the observable index myself... this
 may also be applied to trjconv I think.

 string genergyCall = g_energy -f  + myEdrFile +  -o  + myXvgFile + 
  /dev/null;
 string energyObs = 8; // e.g. potential

 FILE *fpipe;
 fpipe = popen(genergyCall.c_str(),w);
 fwrite(energyObs.data(), 1, 1, fpipe); // tell g_energy what to write
 pclose(fpipe);

 If you want to pipe more stuff to the program you are calling, the buffer
 size of fwrite has to be increased.
 So you might put this into a minimal C-program and start that
 non-interactive with qsub or whatever.


 Dear GMX Users,

 I ask this question in this mailing list since probably a user have
 already encountered this similar problem. I would like to  post-process my
 trajectory with the command trjconv (in mpi mode). For this I use the
 following shell command:

 echo 0 | /usr/pbs/bin/mpiexec /scratch/name/gromacs-4.0.5/bin/trjconv_mpi
 -s Peptide_43A1_topol.tpr -f ./XTC/Whole_Traj_43A1.xtc -o
 ./XTC/Whole_Traj_43A1noPBC.xtc -pbc mol -ur compact. With the selection 0
 (System)

 It works but since my simulations is very long ( 300ns) the command stops
 in the middle of the trajectory before to finish the process ( i suspect a
 time limit for using the interactive mode). So i would like to use a
 script to do the task. How to pass the choice 0 in the script (i.e.
 equivalent to the echo 0). I use a bash shell and the command qsub to
 launch a mpi job.

 I have tried to adapt the examples available in the GMX website with a
 text file as suggested by the author in GROMACS site with no success.

 Thank you again for your help

 ___
 gmx-users mailing list    gmx-us...@gromacs.org
 http://lists.gromacs.org/mailman/listinfo/gmx-users
 Please search the archive at http://www.gromacs.org/search before posting!
 Please don't post (un)subscribe requests to the list. Use the
 www interface or send it to gmx-users-requ...@gromacs.org.
 Can't post? Read http://www.gromacs.org/mailing_lists/users.php


 --
 Alexander Bujotzek
 Zuse Institute Berlin
 Computational Drug Design Group
 Tel. : +49 30 84185-234
 eMail: bujot...@zib.de
 ___
 gmx-users mailing list    gmx-us...@gromacs.org
 http://lists.gromacs.org/mailman/listinfo/gmx-users
 Please search the archive at http://www.gromacs.org/search before posting!
 Please don't post (un)subscribe requests to the list. Use the
 www interface or send it to gmx-users-requ...@gromacs.org.
 Can't post? Read http://www.gromacs.org/mailing_lists/users.php




-- 
Tsjerk A. Wassenaar, Ph.D.
Junior UD (post-doc)
Biomolecular NMR, Bijvoet Center
Utrecht University
Padualaan 8
3584 CH Utrecht
The Netherlands
P: +31-30-2539931
F: +31-30-2537623
___
gmx-users mailing listgmx-users@gromacs.org
http://lists.gromacs.org/mailman/listinfo/gmx-users
Please search the archive at http://www.gromacs.org/search before posting!
Please don't post (un)subscribe requests to the list. Use the
www interface or send it to gmx-users-requ...@gromacs.org.
Can't post? Read http://www.gromacs.org/mailing_lists/users.php


[gmx-users] Making Commands Non-Interactive

2009-10-04 Thread ABEL Stephane 175950
Dear GMX Users,

I ask this question in this mailing list since probably a user have already 
encountered this similar problem. I would like to  post-process my trajectory 
with the command trjconv (in mpi mode). For this I use the following shell 
command: 

echo 0 | /usr/pbs/bin/mpiexec /scratch/name/gromacs-4.0.5/bin/trjconv_mpi -s 
Peptide_43A1_topol.tpr -f ./XTC/Whole_Traj_43A1.xtc -o 
./XTC/Whole_Traj_43A1noPBC.xtc -pbc mol -ur compact. With the selection 0 
(System) 

It works but since my simulations is very long ( 300ns) the command stops in 
the middle of the trajectory before to finish the process ( i suspect a time 
limit for using the interactive mode). So i would like to use a script to do 
the task. How to pass the choice 0 in the script (i.e. equivalent to the echo 
0). I use a bash shell and the command qsub to launch a mpi job. 

I have tried to adapt the examples available in the GMX website with a text 
file as suggested by the author in GROMACS site with no success. 

Thank you again for your help 

winmail.dat___
gmx-users mailing listgmx-users@gromacs.org
http://lists.gromacs.org/mailman/listinfo/gmx-users
Please search the archive at http://www.gromacs.org/search before posting!
Please don't post (un)subscribe requests to the list. Use the 
www interface or send it to gmx-users-requ...@gromacs.org.
Can't post? Read http://www.gromacs.org/mailing_lists/users.php

Re: [gmx-users] Making Commands Non-Interactive

2009-10-04 Thread Justin A. Lemkul



ABEL Stephane 175950 wrote:

Dear GMX Users,

I ask this question in this mailing list since probably a user have already
encountered this similar problem. I would like to  post-process my trajectory
with the command trjconv (in mpi mode). For this I use the following shell
command:



Is trjconv parallelizable?  This is nowhere in the documentation, but if it is, 
that would be very interesting...



echo 0 | /usr/pbs/bin/mpiexec /scratch/name/gromacs-4.0.5/bin/trjconv_mpi -s
Peptide_43A1_topol.tpr -f ./XTC/Whole_Traj_43A1.xtc -o
./XTC/Whole_Traj_43A1noPBC.xtc -pbc mol -ur compact. With the selection 0
(System)

It works but since my simulations is very long ( 300ns) the command stops in
the middle of the trajectory before to finish the process ( i suspect a time
limit for using the interactive mode). So i would like to use a script to do
the task. How to pass the choice 0 in the script (i.e. equivalent to the echo
0). I use a bash shell and the command qsub to launch a mpi job.

I have tried to adapt the examples available in the GMX website with a text
file as suggested by the author in GROMACS site with no success.


I routinely use a text file for scripted jobs.  Odd that yours isn't working. 
Is it just that the command still exits before finishing?  In any case, you can 
make an .ndx file with only an entry for [System].  When presented with one 
choice, trjconv has to choose it.


-Justin



Thank you again for your help





___ gmx-users mailing list
gmx-users@gromacs.org http://lists.gromacs.org/mailman/listinfo/gmx-users 
Please search the archive at http://www.gromacs.org/search before posting! 
Please don't post (un)subscribe requests to the list. Use the www interface

or send it to gmx-users-requ...@gromacs.org. Can't post? Read
http://www.gromacs.org/mailing_lists/users.php


--


Justin A. Lemkul
Ph.D. Candidate
ICTAS Doctoral Scholar
Department of Biochemistry
Virginia Tech
Blacksburg, VA
jalemkul[at]vt.edu | (540) 231-9080
http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin


___
gmx-users mailing listgmx-users@gromacs.org
http://lists.gromacs.org/mailman/listinfo/gmx-users
Please search the archive at http://www.gromacs.org/search before posting!
Please don't post (un)subscribe requests to the list. Use the 
www interface or send it to gmx-users-requ...@gromacs.org.

Can't post? Read http://www.gromacs.org/mailing_lists/users.php


Re: [gmx-users] Making Commands Non-Interactive

2009-10-04 Thread Tsjerk Wassenaar
Hi,

 Is trjconv parallelizable?  This is nowhere in the documentation, but if it
 is, that would be very interesting...

Well, the most interesting part in that regard is probably the I/O.
But that's the hardest bit to parallelize.

 How to pass the choice 0 in the script

Just as you would on the command line...:

#!/bin/bash

echo 0 | /usr/pbs/bin/mpiexec
/scratch/name/gromacs-4.0.5/bin/trjconv_mpi -s Peptide_43A1_topol.tpr
-f ./XTC/Whole_Traj_43A1.xtc -o ./XTC/Whole_Traj_43A1noPBC.xtc -pbc
mol -ur compact

Didn't you try?

There may be a problem, as the script is probably executed in the home
directory. So you need to add a line changing to the right directory;
just as you have done in interactive mode.

Hope it helps,

Tsjerk

-- 
Tsjerk A. Wassenaar, Ph.D.
Junior UD (post-doc)
Biomolecular NMR, Bijvoet Center
Utrecht University
Padualaan 8
3584 CH Utrecht
The Netherlands
P: +31-30-2539931
F: +31-30-2537623
___
gmx-users mailing listgmx-users@gromacs.org
http://lists.gromacs.org/mailman/listinfo/gmx-users
Please search the archive at http://www.gromacs.org/search before posting!
Please don't post (un)subscribe requests to the list. Use the
www interface or send it to gmx-users-requ...@gromacs.org.
Can't post? Read http://www.gromacs.org/mailing_lists/users.php


Re: [gmx-users] Making Commands Non-Interactive

2009-10-04 Thread Mark Abraham

Justin A. Lemkul wrote:



ABEL Stephane 175950 wrote:

Dear GMX Users,

I ask this question in this mailing list since probably a user have 
already
encountered this similar problem. I would like to  post-process my 
trajectory
with the command trjconv (in mpi mode). For this I use the following 
shell

command:



Is trjconv parallelizable?  This is nowhere in the documentation, but if 
it is, that would be very interesting...


No. There are no 4.0.x tools that use MPI. Hence the wiki advice not to 
bother compiling tools in parallel, and the old website installation 
guide directing the use of only make mdrun after reconfiguring with 
--enable-mpi.


echo 0 | /usr/pbs/bin/mpiexec 
/scratch/name/gromacs-4.0.5/bin/trjconv_mpi -s

Peptide_43A1_topol.tpr -f ./XTC/Whole_Traj_43A1.xtc -o
./XTC/Whole_Traj_43A1noPBC.xtc -pbc mol -ur compact. With the selection 0
(System)

It works but since my simulations is very long ( 300ns) the command 
stops in
the middle of the trajectory before to finish the process ( i suspect 
a time
limit for using the interactive mode). So i would like to use a script 
to do
the task. How to pass the choice 0 in the script (i.e. equivalent to 
the echo

0). I use a bash shell and the command qsub to launch a mpi job.

I have tried to adapt the examples available in the GMX website with a 
text

file as suggested by the author in GROMACS site with no success.


I routinely use a text file for scripted jobs.  Odd that yours isn't 
working. Is it just that the command still exits before finishing?  In 
any case, you can make an .ndx file with only an entry for [System].  
When presented with one choice, trjconv has to choose it.


Recompiling without mpi, and doing non-mdrun operations on your local 
machine / cluster login node is usually the approach simplest to use. 
Yes, it's more work when you configure and compile, but you only do that 
every once in a while right?


Mark
___
gmx-users mailing listgmx-users@gromacs.org
http://lists.gromacs.org/mailman/listinfo/gmx-users
Please search the archive at http://www.gromacs.org/search before posting!
Please don't post (un)subscribe requests to the list. Use the 
www interface or send it to gmx-users-requ...@gromacs.org.

Can't post? Read http://www.gromacs.org/mailing_lists/users.php