Re: [AMBER] Periodic image of iwrapped structure

From: Jason Swails <>
Date: Thu, 22 Jan 2015 17:57:05 -0500

> On Jan 22, 2015, at 5:46 PM, Hadeer ELHabashy <> wrote:
> Is it correct to extract a pdb file from a restart file edited by ccptraj
> autoimage command as follows to correctly unwrap a protein structure
> inside a periodic water box ?

No. autoimage *wraps* a trajectory (i.e., it translates the COM of every molecule into the same unit cell).

> using the following commands
> $AMBERHOME/bin/ccptraj topology < > ccptraj.log
> the trajin file
> "trajin file.res
> autoimage
> trajout file_unwrapped.res "
> then use the following command to extract the pdb
> $AMBERHOME/bin/ambpdb -p topology < file.res > file.pdb

This won’t work, and is unnecessary anyway. The trajout command above prints file.res in a mdcrd format, which ambpdb does not understand. You can trajout directly to a PDB file without going through ambpdb at all.

> what is the difference between the command autoimage and the unwrap
> commands of the ccptraj ?

They are opposites (note that “autoimage” is not a unique way to wrap molecules into a unit cell).

> Is there any way to extract unwrapped periodic pdb files directly form the
> wrapped restart file using ccptraj ?


trajin restart_file.rst7
trajout unwrapped.pdb

> Is there any way to unwrap many restart files with one trajin file and one
> ccptraj command?


trajin restart_file1.rst7
trajin restart_file2.rst7
trajin restart_file3.rst7


trajout unwrapped.pdb

If you want a separate PDB for each frame, change the trajout command to:

trajout unwrapped.pdb pdb multi

Or, if you launch the cpptraj interactive interpreter:

bash$ cpptraj -p <prmtop>
> trajin restart_file* # gets all files that start with “restart_file”
> unwrap
> trajout unwrapped.pdb


Jason M. Swails
Rutgers University
Postdoctoral Researcher
AMBER mailing list
Received on Thu Jan 22 2015 - 15:00:04 PST
Custom Search