Re: [AMBER] writing in ptraj a new action requiring prior knowledge of the average coordinates

From: Jose Borreguero <borreguero.gmail.com>
Date: Mon, 24 May 2010 23:22:06 -0400

Nice!
-Jose

On Mon, May 24, 2010 at 9:45 PM, Daniel Roe <daniel.r.roe.gmail.com> wrote:

> Ptraj actually does have a mechanic that checks if a second pass over
> trajectories should be run. The actionInformation struct has a variable
> called performSecondPass that is checked after the first round of
> trajectory
> reads. If set, it calls ptrajProcessTrajectoryFiles again with the 4th arg
> being PTRAJ_SECONDPASS as opposed to PTRAJ_ACTION (check near the end of
> the ptraj() function in ptraj.c to see what I mean). So, you could have
> your
> action do the coord averaging on the first pass, set performSecondPass to
> 1,
> then do whatever is needed on the second pass.
>
> -Dan
>
> On Mon, May 24, 2010 at 9:25 PM, Ross Walker <ross.rosswalker.co.uk>
> wrote:
>
> > Hi Jose,
> >
> > > I want to write a new action in ptraj that requires prior knowledge of
> > > the
> > > average coordinates. Is this possible in a single ptraj session? As I
> > > understand the code, the trajectory is read only once and all requested
> > > actions are performed on the current snapshot, as the "trajectory
> > > pointer"
> > > goes through the trajectory.
> > > Since my action needs the average coordinates *a priori*, I need to
> > > read the
> > > trajectory twice. Can this be done in a single ptraj session?
> >
> > I believe that you would need to modify the code in order to support this
> > as
> > you describe it. However, the easiest approach might be to simply require
> a
> > reference structure which your action uses and this reference structure
> is
> > 'assumed' to be the average structure. One would then run ptraj to write
> a
> > pdb of the average structure and then you run ptraj again to read this
> pdb
> > file as the reference structure. This might be conceptually easier to
> > implement even if it is not quite as clean with regards to how one runs
> it.
> > This could be easily scripted though with a shell script calling both the
> > ptraj runs, or even writing the necessary input files if needed.
> >
> > All the best
> > Ross
> >
> > /\
> > \/
> > |\oss Walker
> >
> > | Assistant Research Professor |
> > | San Diego Supercomputer Center |
> > | Tel: +1 858 822 0854 | EMail:- ross.rosswalker.co.uk |
> > | http://www.rosswalker.co.uk | http://www.wmd-lab.org/ |
> >
> > Note: Electronic Mail is not secure, has no guarantee of delivery, may
> not
> > be read every day, and should not be used for urgent or sensitive issues.
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > AMBER mailing list
> > AMBER.ambermd.org
> > http://lists.ambermd.org/mailman/listinfo/amber
> >
>
>
>
> --
> -------------------------
> Daniel R. Roe
> Postdoctoral Associate
> SAS - Chemistry & Chemical Biology
> 610 Taylor Road
> Piscataway, NJ 08854
> _______________________________________________
> 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 Mon May 24 2010 - 20:30:04 PDT
Custom Search