cat << EOF > cpar6_viol.cya

info   := normal
name   := par6_viol
tf_type := 2
cut_tf := 1000.0
seed   := 35621
tolerance   := 0.03, 0.03, 0.4
cut_upl := 0.25
 
cyanalib
#dyanalib
 
read seq ./par6.seq
 
read prot ./par6.prot
 
read upl par6.upl
 
read aco par6.aco

read cor par6.cor
 
#distance select all
distance stat
distance check
 
structures select 1..20
structure violate structures=5 delete=100
write upl par6_viol.upl
write aco par6_viol.aco

nproc=4
calc_all 100 command=anneal steps=10000
overview file=par6_viol structures=20 range=158..178,195..251 cor full
ramachandran file=rama_viol nobackground label
 
EOF
 
cyana << cpar6_viol.cya > cpar6_viol.out
cpar6_viol
quit
 
grep Upper par6_viol.ovw | sort -n +10 -r > par6_viol.viol
