
BIN=../../../bin
AUXI=../../../auxi

#==============================================
export BIN
export AUXI
#==============================================

#### run the simulation: 5000 trajectories
$BIN/sda_flex sda_prometcs.in > sda_out

#### clustering of the complexes file
# It is slighlty different than for barnase-barstar example
# because a surface is present

# make format compatible to the clustering programs
$BIN/read_record complexes_prometcs -format_cluster > out_surface_clustering

# rotate protein structures to eliminate x/y coordinates
python ${AUXI}/DelRotZ_complexes-SDA7.py complexes_prometcs.comp_cluster 2000 >> out_surface_clustering

# do clustering using single-linkage method
python ${AUXI}/myClustering_complexes-SDA7.py  wtrotz.comp_cluster ../data_grid/p2.pqr 2000 >> out_surface_clustering
rm -f Min0*.pdb
# generate PDB structures of representatives from the first 5 clusters
${BIN}/trajectory2dcd mycluster.comp_cluster Min.pdb -input sda_prometcs.in -nb_complexes 5 >> out_surface_clustering


