#!/usr/bin/env csh
# $1 - number of replicas
# $2 - number of exchange steps
# $3 - pH
# $4 - icond

set nreplica = $1
set Nxchange = $2
set pH = $3
set icond = $4
rexinfo.pl -bycond $icond > rexinfo-$icond.data

set file = ph-$pH.ens$icond-$Nxchange.lambda
extractLamb.pl $nreplica $Nxchange 500 500 rexinfo-$icond.data final.lamb
mv rexinfo-$icond.data.lambda $file

cptSX.pl $file 1 $Nxchange $pH
