I made no changes to the loading of the parameter/forcefield/topology files, but I got an error in that portion:

Code:
[login-2:12549] *** Process received signal ***
[login-2:12549] Signal: Segmentation fault (11)
[login-2:12549] Signal code: Address not mapped (1)
[login-2:12549] Failing at address: 0xbadda73c38
[login-2:12549] [ 0] /lib64/libpthread.so.0 [0x2b5fb68a0ca0]
[login-2:12549] [ 1] /cell_root/software/openmpi/1.2.5/gnu/sys/lib/libopen-pal.so.0(_int_malloc+0xb39) [0x2b5fb59c14b9]
[login-2:12549] [ 2] /cell_root/software/openmpi/1.2.5/gnu/sys/lib/libopen-pal.so.0(malloc+0x88) [0x2b5fb59c2a38]
[login-2:12549] [ 3] /homes/jbklauda/charmm/c35b5/exec/gnu/g77-xlg(veheap_+0xd8) [0x6b0838]
[login-2:12549] [ 4] /homes/jbklauda/charmm/c35b5/exec/gnu/g77-xlg(allhp_+0x28d) [0xb7109d]
[login-2:12549] [ 5] /homes/jbklauda/charmm/c35b5/exec/gnu/g77-xlg(correl_+0x43e) [0x45cefe]
[login-2:12549] [ 6] /homes/jbklauda/charmm/c35b5/exec/gnu/g77-xlg(maincom_+0x319) [0x437789]
[login-2:12549] [ 7] /homes/jbklauda/charmm/c35b5/exec/gnu/g77-xlg(MAIN__+0xad5) [0x43aa55]
[login-2:12549] [ 8] /homes/jbklauda/charmm/c35b5/exec/gnu/g77-xlg(main+0xe) [0xc1f09e]
[login-2:12549] [ 9] /lib64/libc.so.6(__libc_start_main+0xf4) [0x2b5fb6acb9c4]
[login-2:12549] [10] /homes/jbklauda/charmm/c35b5/exec/gnu/g77-xlg [0x4348c9]
[login-2:12549] *** End of error message ***
Segmentation fault


My updated script that I tried to run:

Code:
stream toppar.str

read psf card name "/export/lustre_1/mallsopp/dpc/radius/setup/micelle-tmp-sim1.psf"
OPEN UNIT 1 READ CARD NAME "/export/lustre_1/mallsopp/dpc/radius/setup/micelle-tmp-sim1.crd"
READ COOR UNIT 1 CARD
CLOSE UNIT 1

coor copy comp

open unit 11 write form name distpcom.dat
write title unit 11
* time distpcom
*

OPEN READ UNIT 100 FILE NAME "/export/lustre_1/mallsopp/dpc/radius/setup/micelle-tmp-sim1.dcd"

correl maxtime 1000000 maxseries 100000

enter comx atom x sele segid DPC end mass
enter comy atom y sele segid DPC end mass
enter comz atom z sele segid DPC end mass

set num 1
label loop

enter px@num atom x sele resid @num .and. type P end mass
enter py@num atom y sele resid @num .and. type P end mass
enter pz@num atom z sele resid @num .and. type P end mass

incr num by 1
if num lt @nres goto loop

TRAJECTORY FIRSTU 100 NUNIT 1 stop 74002000


!make negative
mantime comx mult -1
mantime comy mult -1
mantime comz mult -1

set num 1
label loop2

!subtract by adding the negative
mantime px@num add comx
mantime py@num add comy
mantime pz@num add comz

!square the difference
mantime px@num ipower 2
mantime py@num ipower 2
mantime pz@num ipower 2

!sum
mantime px@num add py@num
mantime px@num add pz@num

!square root
mantime px@num sqrt

incr num by 1
if @num lt @nres goto loop2

!now average all px@num 's

set num 2
label loop3
mantime px1 add px@num
incr num by 1
if num lt @nres goto loop3

mantime px1 divi @nres

write px1 dumb time unit 11
*hi
*
end