Topic Options
#4014 - 11/02/04 08:09 PM cor2pdb.inp
chuan Offline
Forum Member

Registered: 05/17/04
Posts: 222
* Convert cor trajectory to pdb format
* Author: Hock-Chuan YEO
*

set FILE 125l
set N 1

set START 100500 !starting frame no.
set END 333000 !ending frame no.
set INCR 500 !change in frame no. from one frame to the next
calc LOOP = @END-@START

read rtf card name $TOPPAR/top_all27_prot_lipid.rtf
read para card name $TOPPAR/par_all27_prot_lipid.prm

! Get starting psf and coordinates
open read formatted unit 3 name @FILE-solv.psf
read psf card unit 3
open unit 4 card read name @FILE_0.crd
read coor card unit 4

open unit 67 write form name @FILE-@N-cor.pdb !output pdb trajectory
open unit 31 read unform name @FILE-@N.cor !input cor trajectory
traj iread 31 nrea 1 begin @START stop @END skip @INCR

set tr @INCR

LABEL ILP
traj read
write coor pdb unit 67
incr tr by @INCR
if tr .le. @LOOP goto ILP

stop
_________________________
CHARMM 30b1 driven by 1/ Xeon (32 bits) 2/ Redhat 7.3 (32 bits) with a Quadrics-modified 2.4-18-5 kernel 3/ Chuan, with 95% of the mentorship coming from great scientists frequenting this forum. 4/ Gracious support from the forum.

Top
#4015 - 01/09/07 06:04 AM Re: cor2pdb.inp [Re: chuan]
svohra Offline
Forum Member

Registered: 11/09/05
Posts: 19
Loc: United kingdom
Hi
When I run the above script the program tterminates without giving the error message. It does save the first frame.
INPUT FILE
* Convert cor trajectory to pdb format
* Author: Hock-Chuan YEO
*

set FILE finalmodel_heat_2

set START 110000 !starting frame no.
set END 120000 !ending frame no.
set INCR 1000 !change in frame no. from one frame to the next
calc LOOP = @END-@START

! Read in Topology and Parameter files(with new restraints in thirdset)

open unit 1 card read name top_all22_prot_cmap.inp
read RTF card unit 1
close unit 1


open unit 1 card read name par_all22_prot_cmap.inp
read PARA card unit 1
close unit 1


! Get starting psf and coordinates
open read formatted unit 27 name finalmodel.psf
read psf card unit 27
open read formatted unit 27 name @FILE.pdb
read coor pdb unit 27

open unit 67 write form name @FILE_cor.pdb !output pdb trajectory
open unit 50 read unform name @FILE.dcd !input cor trajectory
traj iread 50 nrea 1 begin @START stop @END skip @INCR

set tr @INCR

LABEL ILP
traj read
write coor pdb unit 67
* frame @INCR
*
incr tr by @INCR
if tr .le. @LOOP goto ILP

STOP

OUTPUT FILE
CHARMM> set tr @INCR
Parameter: INCR -> "1000"
Parameter: TR <- "1000"

CHARMM>

CHARMM> LABEL ILP

CHARMM> traj read

READING TRAJECTORY FROM UNIT 50
NUMBER OF COORDINATE SETS IN FILE: 600
NUMBER OF PREVIOUS DYNAMICS STEPS: 60100
FREQUENCY FOR SAVING COORDINATES: 100
NUMBER OF STEPS FOR CREATION RUN: 60000

TITLE> * CHARMM INPUT FILE FOR SYSTEM HEATING
TITLE> * DATE: 1/ 8/ 7 15: 5: 0 CREATED BY USER: svohra
TITLE> *

CHARMM> write coor pdb unit 67
RDTITL> * FRAME 1000
RDTITL> *

CHARMM> incr tr by @INCR
Parameter: INCR -> "1000"
Parameter: TR <- "2000"

CHARMM> if tr .le. @LOOP goto ILP
Parameter: LOOP -> "10000"
Comparing "2000" and "10000".
IF test evaluated as true. Performing command

ANY HELP IS APPRECIATED

Thanks

Top
#4016 - 01/10/07 05:29 AM Re: cor2pdb.inp [Re: svohra]
lennart Online   content

Forum Member

Registered: 09/25/03
Posts: 4741
Loc: ~ 59N, 15E
The script probably needs to open a new PDB file for each frame; I do not know if this is related to your problem. If you are using MPI it may be that it is the old stdin rewind MPI problem you have run into. See parallel.doc for a workaround.
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top

Moderator:  chmgr, John Legato, petrella