Detailed description for most of these examples is available in the Running CPPTRAJ page.
Create a PDB file from a topology and a coordinate file. | cpptraj -p topology-file.prmtop -y coordinate-file.coords -x output-file.pdb |
Review how many frames are in a trajectory file | cpptraj -p topology-file.prmtop -y coordinate-file.coords -tl |
To read a file that contains CPPTRAJ commands | cpptraj -i INPUTFILE |
To inspect residue number one from a topology. This also works for atoms using @1 instead of :1 |
cpptraj -p topology-file.prmtop --mask :1 |
To extract the charge from a residue. | cpptraj -p topology-file.prmtop --charge :1 |
Do RMSD analysis of the first molecule (which presumably is chain A) |
rms R0 first ^1&@C,CA,N out rms.R0.dat |
To view more information (#Res, Name, First atom, Last atom, number of atoms, #Orig and #Mol) for residues one through ten. | cpptraj -p topology-file.prmtop --resmask :1-10 |
To extract a single frame from a trajectory file, use the -ya keyword to send arguments to trajin |
cpptraj -p topology-file.prmtop -y trajectory-file.nc -ya 'lastframe' -x output-file.pdb |
Quickly print the residues that are in a topology file | cpptraj -p topology-file.prmtop --resmask \* This will print all the residues in the topology file
|
Run a loop inside CPPTRAJ – Example 1 |
parm A.prmtop for FRAME in 1,78,100,101,170 trajin A.nc $FRAME $FRAME done |
Run a loop inside CPPTRAJ – Example 2 |
|