54 lines
2.7 KiB
Bash
Executable File
54 lines
2.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
#######################################################################################
|
|
## ADJUSTABLE PARAMETERS ##
|
|
#######################################################################################
|
|
|
|
# set folder name that contains the jobs
|
|
job_folder="4-new_jobs"
|
|
|
|
#######################################################################################
|
|
## CLUSTER ANALYSIS ##
|
|
#######################################################################################
|
|
|
|
out_dir="$(basename ${0})"
|
|
out_dir="${out_dir%%.*}"
|
|
|
|
# create array of systems
|
|
|
|
function get_systems() {
|
|
systems=()
|
|
all_systems=()
|
|
_jobs=( $(ls -d ../${job_folder}/*/*/) )
|
|
for _job in ${_jobs[@]}; do
|
|
all_systems+=( $(basename ${_job}) )
|
|
done
|
|
systems+=( $(for _system in ${all_systems[@]}; do echo ${_system}; done | sort -u) )
|
|
}
|
|
get_systems
|
|
|
|
for system in ${systems[@]}; do
|
|
mkdir -p ${out_dir}/median/${system}
|
|
mkdir -p ${out_dir}/average/${system}
|
|
|
|
# median clusters
|
|
|
|
# on SrtA
|
|
( echo 'chA_&_CA_&_r_66-205' 'System' | gmx cluster -f 1-concat/combined/${system}-*.trr -s 1-concat/combined/${system}-*.pdb -n 2-ndx/${system}.ndx -g ${out_dir}/median/${system}/${system}.log -cutoff 0.2 -fit -method gromos -o ${out_dir}/median/${system}/${system}.xpm -dist ${out_dir}/median/${system}/${system}.xvg -cl ${out_dir}/median/${system}/${system}.pdb ) &
|
|
|
|
# on ligand
|
|
( echo 'chB' 'System' | gmx cluster -f 1-concat/combined/${system}-*.trr -s 1-concat/combined/${system}-*.pdb -n 2-ndx/${system}.ndx -g ${out_dir}/median/${system}/${system}_ligand.log -cutoff 0.2 -fit -method gromos -o ${out_dir}/median/${system}/${system}_ligand.xpm -dist ${out_dir}/median/${system}/${system}_ligand.xvg -cl ${out_dir}/median/${system}/${system}_ligand.pdb ) &
|
|
|
|
# average clusters
|
|
|
|
# on SrtA
|
|
( echo 'chA_&_CA_&_r_66-205' 'System' | gmx cluster -f 1-concat/combined/${system}-*.trr -s 1-concat/combined/${system}-*.pdb -n 2-ndx/${system}.ndx -g ${out_dir}/average/${system}/${system}_av.log -cutoff 0.2 -fit -method gromos -o ${out_dir}/average/${system}/${system}_av.xpm -dist ${out_dir}/average/${system}/${system}_av.xvg -av -cl ${out_dir}/average/${system}/${system}_av.pdb ) &
|
|
|
|
# on ligand
|
|
( echo 'chB' 'System' | gmx cluster -f 1-concat/combined/${system}-*.trr -s 1-concat/combined/${system}-*.pdb -n 2-ndx/${system}.ndx -g ${out_dir}/average/${system}/${system}_ligand_av.log -cutoff 0.2 -fit -method gromos -o ${out_dir}/average/${system}/${system}_ligand_av.xpm -dist ${out_dir}/average/${system}/${system}_ligand_av.xvg -av -cl ${out_dir}/average/${system}/${system}_ligand_av.pdb ) &
|
|
|
|
wait
|
|
|
|
done
|
|
|