scd-chn.inp; bonus comments included; see also scd-eth.inp

* the axial avg order parameter for an input C no.; @N files
* additional required arg C: chain carbon number @C
*

bomblev -2
stream rtfprm.str
stream psfcrd.str

calc mxa 80 * 6 * 4
calc mxs 10 + 80*2 * 4
calc mxt 200 * @N

correl maxtim @MXT maxa @MXA maxs @MXS
enter sr zero
enter ss dupl sr
enter sx dupl sr
enter sy dupl sr
set k 1
! TRAILING LETTERS IN THE 'H' ATOM NAMES REQUIRE @{C}, NOT @C
label elp
enter w@K vect z L @K H@{C}R L @K C2@C
enter a@K vect r L @K H@{C}R L @K C2@C
enter x@K vect z L @K H@{C}S L @K C2@C
enter b@K vect r L @K H@{C}S L @K C2@C
enter y@K vect z L @K H@{C}X L @K C3@C
enter c@K vect r L @K H@{C}X L @K C3@C
enter z@K vect z L @K H@{C}Y L @K C3@C
enter d@K vect r L @K H@{C}Y L @K C3@C
incr k by 1
if k le 80 goto elp

set k 1
label klp
calc u @K + 7
open unit @U file read name dyn@K.trj
incr k by 1
if k .le. @N goto klp
traj firstu 8 nunit @N
! LOOP OVER LIPIDS; NORM, CALC SCD, ACCUM
calc r80 1. / 80.
set k 1
label clp
mantim w@K ratio a@K
mantim w@K squa
mantim w@K mult 1.5
mantim w@K shift -0.5
mantim w@K mult @R80
mantim sr add w@K
mantim x@K ratio b@K
mantim x@K squa
mantim x@K mult 1.5
mantim x@K shift -0.5
mantim x@K mult @R80
mantim ss add x@K
mantim y@K ratio c@K
mantim y@K squa
mantim y@K mult 1.5
mantim y@K shift -0.5
mantim y@K mult @R80
mantim sx add y@K
mantim z@K ratio d@K
mantim z@K squa
mantim z@K mult 1.5
mantim z@K shift -0.5
mantim z@K mult @R80
mantim sy add z@K
incr k by 1
if k le 80 goto clp
edit sr veccod 4 delta 0.001 skip 1000 offset 1.
! MIXED CASE IS IGNORED; @C IS THE CHAIN CARBON NO.
open write unit 1 card name scd/v@C.dat
write sr unit 1 dumb time
* dumb
*
end
stop