*FILENAME: merge-recenter-trajectory.inp
*PURPOSE: merge trajectories, recentering solvent around protein
*AUTHOR: Lennart Nilsson, Karolinska Institutet, October 2003
*
!unix environment variable CHM_HOME points to CHARMM installation directory
!see dynamc.doc section Merge for more details, also about other manipulations
!of a PBC trajectory
read rtf card name $CHM_HOME/toppar/top_all22_prot.inp
read para card name $CHM_HOME/toppar/par_all22_prot.inp
read psf card name my_psf.psf
read coor card name my_coordinates.crd

! Initial trajectory
open unit 51 read unform name my_traj_1.cor
open unit 52 read unform name my_traj_2.cor
! New, merged trajectory with protein now in the middle of the solvent
! This is useful for many kinds of analyses of solute-solvent interactions
open unit 81 write unform name traj_recenter.cor
! Here you need the same set of image or crystal definitions as were used
! when the trajectory was created
crystal define orthorhombic 45.0 30.0 48.0 90.0 90.0 90.0
crytal build cutoff 14.0

! Image statemnts for those molecules that should be recentered
image byresidue sele segid SOLV .or. segid SOD end

! first selection picks up those atoms that will be written to new trajectory
! second selection is used to define the reference around which solvent is recentered
! prnlev 1 ! uncomment if you want to suppress massive amount of messages about recentering
merge first 51 nunit 2 output 81 skip 500 - ! one frame/ps is all we need
sele all end recenter sele segid prot .and. .not. hydrogen end



Edited by lennart (06/18/10 11:52 AM)
Edit Reason: added read coor command
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden