X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=examples%2FUNRES-Dock%2Foutput%2Fcluster2allatom.csh;fp=examples%2FUNRES-Dock%2Foutput%2Fcluster2allatom.csh;h=9805593e65fa2b712aa3b6b574df5d3e004babef;hb=018446aca1e32faf80f41e818acbfc61e5d872c9;hp=0000000000000000000000000000000000000000;hpb=88d4f45c783f3644ff7ae49572b7b609ef3c9617;p=unres.git diff --git a/examples/UNRES-Dock/output/cluster2allatom.csh b/examples/UNRES-Dock/output/cluster2allatom.csh new file mode 100755 index 0000000..9805593 --- /dev/null +++ b/examples/UNRES-Dock/output/cluster2allatom.csh @@ -0,0 +1,46 @@ +#!/bin/tcsh +set file=$1 +set numstruc = `grep -c ENERGY $file` +set numatom = `grep -c ATOM $file` +#echo $numstruc $numatom +#set numTER = `grep -c TER $file` +set numatom = `echo "($numatom / $numstruc)+3" | bc` +#set numatom = `echo $numatom | cut -c 1-5` +set i = 1 +set j = 2 +echo "TER" > TER + +set num1 = `echo $numatom + 1 | bc` +set num2 = $num1 +rm structur*.pdb + +echo $i $numstruc $numatom $num1 $num2 + +rm tempo +echo "NUMATOM" $numatom +grep -A $numatom ENERGY $file > tempo + +while ($i <= $numstruc) +echo a$i +tail -99999999999 tempo | head -$num2 | tail -$num1 > structur$i.pdb +set num2 = `echo $num2 + $num1 +1 | bc` +echo b$i $num1 $num2 +set i = `echo $i+1 | bc` +end + +set i = 1 +set j = 2 +while ($j <= $numstruc) +grep -v TER structur$j.pdb > structure$i.pdb +grep " A " structure$i.pdb > structure${i}a.pdb +egrep " B | C " structure$i.pdb > structure${i}b.pdb +/users2/vetinari/pulchra306/pulchra -q -f -g structure${i}a.pdb +/users2/vetinari/pulchra306/pulchra -q -f -g structure${i}b.pdb + +cat structure${i}a.rebuilt.pdb TER structure${i}b.rebuilt.pdb > structure${i}.pdb + +set i = `echo $i+1 | bc` +set j = `echo $j+2 | bc` +rm structur$i.pdb structure$i.pdb structure${i}a.pdb structure${i}b.pdb structure${i}a.rebuilt.pdb structure${i}b.rebuilt.pdb +end +rm TER