<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/bin/csh
# script for generating protons 
# #1 entry name

setenv CNS_BIN /s/src/cns_solve_1.1/intel-i686-linux/bin
setenv TOPPAR  /u/francis/waterrefine/toppar
#setenv CONV_DIR /u/volkman/at3g01050/valid/conversion 

splitpdb_new 1xxx.pdb
xplor &lt; generate_1xxx.inp &gt; generate_1xxx.log

set entry = 1xxx
set list = (`\ls $entry"_"[0-9].pdb $entry"_"[0-9][0-9].pdb`)
echo "Found number of models: $#list"

set x = $entry"_9".pdb
foreach x ($list)
  echo "doing $x"
  # defining file names
  set inname=$x
  set outname=$x:r_cns.pdb
  set genename='generateProtons_'$entry'.inp'
  
  sed -e s/FILENAME_IN.pdb/$inname/ \
      -e s/FILENAME_OUT.pdb/$outname/ generateProtons.inp &gt; $genename
  $CNS_BIN/cns_solve &lt; $genename &gt; $x:r_proton.log
 
end

# inserted from renameFiles.csh by BFV

set list = (`\ls $entry"_"[0-9]"_cns".pdb $entry"_"[0-9][0-9]"_cns".pdb`)
echo "Found number of models: $#list"
echo "Found models: $list"


@ count = 1
while ( $count &lt; 21 )
  echo "doing model $count"
  # defining file names
  set inname=$entry"_"$count"_cns".pdb
  set outname=$entry"_"$count.pdb
  \mv -f $inname $outname
  @ count ++
end

</pre></body></html>