Re: [AMBER] Obtain trajectory in NAB

From: David A Case <case.biomaps.rutgers.edu>
Date: Thu, 4 Oct 2012 10:10:02 -0400

On Thu, Oct 04, 2012, Sangmin Lee wrote:
>
>
> I conducted LMOD minimization using NAB program.(Ambertools 1.4, Amber11)
>
> I want to get trajectory files from every optimization steps(lo.niter)
> of the script below.
> According to Ambertools manual, trajectory is stored in lmod_traj[].
> I think that I should use fopen(). but I don`t know how to use exactly.

No, fopen() is not appropriate. The lmod_traj[] file is an array in memory,
not a file on disk.

>
> allocate conflib[ lo.nconf * 3*natm ];
> allocate lmod_traj[ (lo.niter+1) * 3*natm ];
>
> mm_options( "ntpr=999, gb=1, cut=999.0, scee=1.0, scnb=1.0, diel=C" );
> mme_init( mol, NULL, "::ZZZ", dummy, NULL );

You actually have to carry out an lmod run; after that, the first 3*natm
elements of lmod_traj[] array will be the coordinates for the first
configuration, the next 3*natm elements will be the second configuration, etc.

You might use the putxv() function to save these to an Amber restart format
file, e.g. (untested!)

    putxv( "conf1.rst", "first lmod configuration", natom, 0.0, lmod_traj[0],
         vel );
    putxv( "conf2.rst", "second lmod configuration", natom, 0.0,
         lmod_traj[3*natom], vel );
    ....

Here "vel" is an array of length 3*natm, probably initialized to zero.

You could then use ambpdb to convert the restart files to pdb format if you
like. There are other ways to skin this case, such as using setmol_from_xyz()
followed by a putpdb() call.

Please note: I suggest starting with a very small problem, and a small number
of iterations, to make sure that you understand what is going on here. Then
you can graduate to "real" systems.

Note 2: I've never made use of the lmod_traj[] function myself.

...good luck...dac

-- 
================================================================
David A. Case                     | case.biomaps.rutgers.edu   
BioMaPS Institute and Dept. of    |                             
    Chemistry & Chemical Biology  |    fax:      +1-732-445-4320
Rutgers University                |    office:   +1-848-445-5885
174 Frelinghuysen Road, Rm. 208b  |    cell:     +1-609-651-6817
Piscataway, NJ 08854        USA   | http://casegroup.rutgers.edu
================================================================
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Thu Oct 04 2012 - 07:30:03 PDT
Custom Search