Re: [AMBER] Query regarding density analysis in CPPTRAJ. Raising this issue again.

From: ARITRA MITRA <aritra18.iitg.ac.in>
Date: Thu, 13 May 2021 14:34:06 +0000

Dear Dan,
I am following your code but ending up with syntax errors. Here is a sample of the code I am running:

set out1 = number_density.dat

set del = 'delta 0.1'

set mask = '":OLA| :LQZ"'

parm des-50-wat-50-253K.prmtop

trajin des50-pd-1076ns.nc

set MAX = trajinframes

clear trajin
for i=1;i<=$MAX;i++
 trajin des50-pd-1076ns.nc $i $i
 center $mask origin
 density out ./out_files/$out1.$i number $del $mask name frame.$i
 clear trajin
done

The error I am getting is as follows:

[for i=1;i<=1000;i++]
    Setting up 'for' loop.
Error: End argument must be an integer.
1 errors encountered reading input.
I am not sure as to where I am going wrong. I have looked up the usage of for loops in CPPTRAJ and I can't figure out the error in my code.
I am using AmberTools19. Can you please help me out?


Regards,

Aritra Mitra,

Senior Research Fellow,‚Äč

Prof. Sandip Paul's Group,

Department of Chemistry,

IIT Guwahati.


________________________________
From: Daniel Roe <daniel.r.roe.gmail.com>
Sent: 12 May 2021 00:39
To: AMBER Mailing List <amber.ambermd.org>
Subject: Re: [AMBER] Query regarding density analysis in CPPTRAJ. Raising this issue again.

Hi,

You might be able to get what you want with a for loop. Something like:

set masks = '":PC.P31" ":PC.N31" ":PC.C2" ":PC | :OL | :OL2"'
set del = 'delta 0.25'
set out1 = number_density.dat
parm ../DOPC.parm7
trajin ../DOPC.rst7
# Set MAX to the current number of frames
set MAX = trajinframes
# Clear the trajectory
clear trajin
# Loop over each frame individually, calculate density
for i=1;i<=$MAX;i++
  # Load only the desired frame
  trajin ../DOPC.rst7 $i $i
  center ":PC | :OL | :OL2" origin
  density out $out1.$i number $del $masks name frame.$i
  # Clear that frame
  clear trajin
done

Hope this helps,

-Dan

On Tue, May 11, 2021 at 2:03 PM ARITRA MITRA <aritra18.iitg.ac.in> wrote:
>
> Dear Amber Users,
> This query is regarding the 'density' analysis in CPPTRAJ. I am running the following script in order to obtain the density distribution of water as a function of box length in the x direction.
>
> parm abc.prmtop
> trajin abc.crd
> density out wat-density-x.dat name x-axis-wat delta 0.1 x mass :WAT
>
> The output file contains the density values averaged over the entire trajectory (along with the standard deviation values) . For the purpose of my analysis, I wish to calculate the
> density values per frame such that in addition
> to the box length and density data the time information will also be written out. I need a workaround to bypass the time average feature of the 'density' keyword. Any suggestion on this
> topic is highly appreciated.
> Thanks in advance.
>
>
>
> Regards,
>
> Aritra Mitra,
>
> Senior Research Fellow,
>
> Prof. Sandip Paul's Group,
>
> Department of Chemistry,
>
> IIT Guwahati.
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Thu May 13 2021 - 08:00:02 PDT
Custom Search