-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/13/2010 02:08 PM, Florian Dommert wrote:
> On 10/13/2010 01:01 PM, Eudes Fileti wrote:
>> Hi Florian, thank you for your help!
>> I informed at the file.mdp that the velocities should be saved:
> 
>> ; OUTPUT CONTROL OPTIONS
>> ; Output frequency for coords (x), velocities (v) and forces (f)
>> nstxout                  = 10
>> nstvout                  = 10
>> nstfout                  = 0
>> ;
> 
> 
> Hi,
> 
> I took a quick look at the code and realized that the problem is the -m
> flag. I will try to fix this and report ASAP.
> 
> 
> /Flo
> 
> 

Hello,

 there is a wrong check in line 164/165:

  if (bMol)
    bTPS = bM || ftp2bSet(efTPS,NFILE,fnm) ||
           !ftp2bSet(efNDX,NFILE,fnm);

It should be:

  if (bMol || bM)
    bTPS = ftp2bSet(efTPS,NFILE,fnm) || !ftp2bSet(efNDX,NFILE,fnm);

If you change this lines in src/tools/gmx_velacc.c and recompile,
everything should work fine.

Attached there is a patch against the master branch which should fix the
issue.

/Flo

P.S Perhaps a developer can commit this patch :)


> 
> 
>> Also, I checked the trajectory using gmxcheck and I got this:
> 
>> Checking file traj.trr
>> trn version: GMX_trn_file (single precision)
>> Reading frame       0 time    0.000   
>> # Atoms  7178
>> Last frame     150000 time 3000.000   
> 
> 
>> Item        #frames Timestep (ps)
>> Step        150001    0.02
>> Time        150001    0.02
>> Lambda      150001    0.02
>> Coords      150001    0.02
>> Velocities  150001    0.02
>> Forces           0
>> Box         150001    0.02
> 
> 
>> So I believe that velocities are OK.
>> I've been using version 4.5 and not version 4.5.1, 
>> Do you believe that's the problem? Or it could be memory problem? 
>> _______________________________________
>> Eudes Eterno Fileti
>> Centro de Ciências Naturais e Humanas
>> Universidade Federal do ABC  CCNH
>> Av. dos Estados, 5001
>> Santo André - SP - Brasil
>> CEP 09210-971
>> http://fileti.ufabc.edu.br
> 
> 
> 
>>     On 10/12/2010 11:12 PM, Eudes Fileti wrote:
>>     >  Hi everybody, I'm trying to use g_velacc to calculate the diffusion
>>     > coeficient for my solute.
>>     >  For this, I performed a simple simulation to test such tool.
>>     >
>>     >  1000 water molecules,
>>     >  NPT ensemble
>>     >  positions and velocities colected every 0.01ps
>>     >  Gromacs 4.5.
>>     >
>>     >  However, once I run: g_velacc -f traj -s -n index.ndx -o -m -acflen
>>     > 1000 -nonormalize
>>     >
>>     > I get the following error:
>>     >
>>     > Group     0 (         System) has  3000 elements
>>     > Group     1 (            SOL) has  3000 elements
>>     > Group     2 (             OW) has  1000 elements
>>     > Group     3 (            HW1) has  1000 elements
>>     > Group     4 (            HW2) has  1000 elements
>>     > Select a group: 1
>>     > Selected 1: 'SOL'
>>     > trn version: GMX_trn_file (single precision)
>>     > Reading frame       0 time    0.000   Segmentation fault
> 
>>     Recently I used g_velacc in gmx 4.0.7 and it worked fine. Now I just
>>     tested the gmx4.5.1 version for you and it also worked. So it seems that
>>     there is something wrong with your trajectory. Are you sure that
>>     velocities were saved, which is not the case for an xtc file. You have
>>     to explicitly define nstvout in your mdp file, that tells gromacs how
>>     often the velocities should be written to the trr file.
> 
>>     /Flo
> 
>>     >
>>     > I've tried several things. I changed flag values. I tried the -mol
>>     > option. I tried converting a trajectory
>>     > to another format (.trj). I tried using the version 3.3.3 of g_velacc.
>>     > Nothing worked, always the same error.
>>     > Could someone give me a hand?
>>     > Grateful
>>     > eef
>>     > _______________________________________
>>     > Eudes Eterno Fileti
>>     > Centro de Ciências Naturais e Humanas
>>     > Universidade Federal do ABC  CCNH
>>     > Av. dos Estados, 5001
>>     > Santo André - SP - Brasil
>>     > CEP 09210-971
>>     > http://fileti.ufabc.edu.br
>>     >
> 
> 
>>     - --
>>     Florian Dommert
>>     Dipl.-Phys.
> 
>>     Institute for Computational Physics
> 
>>     University Stuttgart
> 
>>     Pfaffenwaldring 27
>>     70569 Stuttgart
> 
>>     Phone: +49(0)711/685-6-3613
>>     Fax:   +49-(0)711/685-6-3658
> 
>>     EMail: [email protected]
>>     <mailto:[email protected]>
>>     Home: http://www.icp.uni-stuttgart.de/~icp/Florian_Dommert
> 
> 
> 
> 
> 

- -- 
Florian Dommert
Dipl.-Phys.

Institute for Computational Physics

University Stuttgart

Pfaffenwaldring 27
70569 Stuttgart

Phone: +49(0)711/685-6-3613
Fax:   +49-(0)711/685-6-3658

EMail: [email protected]
Home: http://www.icp.uni-stuttgart.de/~icp/Florian_Dommert
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAky1ptoACgkQLpNNBb9GiPk0MACgrD5gqkkcfLvqNg62hkGEE5rc
TnUAn2eSLwCvu9VvZBkPh0eX3KWcJ6eA
=2Gna
-----END PGP SIGNATURE-----
diff --git a/src/tools/gmx_velacc.c b/src/tools/gmx_velacc.c
index d656889..b2bbd9a 100644
--- a/src/tools/gmx_velacc.c
+++ b/src/tools/gmx_velacc.c
@@ -162,8 +162,8 @@ int gmx_velacc(int argc,char *argv[])
   parse_common_args(&argc,argv,PCA_CAN_VIEW | PCA_CAN_TIME | PCA_BE_NICE,
 		    NFILE,fnm,npargs,ppa,asize(desc),desc,0,NULL,&oenv);
 
-  if (bMol)
-    bTPS = bM || ftp2bSet(efTPS,NFILE,fnm) || !ftp2bSet(efNDX,NFILE,fnm);
+  if (bMol || bM)
+    bTPS = ftp2bSet(efTPS,NFILE,fnm) || !ftp2bSet(efNDX,NFILE,fnm);
 
   if (bTPS) {
     bTop=read_tps_conf(ftp2fn(efTPS,NFILE,fnm),title,&top,&ePBC,NULL,NULL,box,

Attachment: g_velacc.patch.sig
Description: Binary data

-- 
gmx-users mailing list    [email protected]
http://lists.gromacs.org/mailman/listinfo/gmx-users
Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
Please don't post (un)subscribe requests to the list. Use the 
www interface or send it to [email protected].
Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

Reply via email to