#!/bin/sh

# This is a short test script to test python binding
# of cctbx

# The setpaths is included in ccp4.setup
#. $CCP4/lib/cctbx/cctbx_build/setpaths.sh
# or
#. $CCP4/src/phaser/phaser-1.3.2/build/intel-linux/setpaths.sh

# cctbx dispatchers
echo " "
echo "** RUNNING cctbx.show_dist_paths"
echo " "
cctbx.show_dist_paths
echo " "
echo "** RUNNING cctbx.show_build_path"
echo " "
cctbx.show_build_path
echo " "
echo "** RUNNING cctbx.getting_started"
echo " "
cctbx.getting_started

# iotbx dispatchers
echo " "
echo "** RUNNING iotbx.crystal_symmetry_from_any"
echo " "
iotbx.crystal_symmetry_from_any "20, 30, 40, 90, 89, 90, P21"
echo " "
echo "** RUNNING iotbx.mtz.dump"
echo " "
iotbx.mtz.dump  $CEXAM/toxd/toxd.mtz
echo " "
echo "** RUNNING iotbx.pdb.as_xray_structure"
echo " "
iotbx.pdb.as_xray_structure --space_group=P212121 --pickle=tmp1.pickle $CEXAM/toxd/toxd.pdb
echo " "
echo "** RUNNING iotbx.reflection_statistics"
echo " "
iotbx.reflection_statistics $CEXAM/toxd/toxd.mtz
echo " "
echo "** RUNNING iotbx.reflection_file_converter"
echo " "
iotbx.reflection_file_converter $CEXAM/toxd/toxd.mtz --sca=toxd.sca --label=FTOXD3,SIGFTOXD3  --scale_factor=0.01

# libtbx dispatchers
echo " "
echo "** RUNNING libtbx.show_commands"
echo " "
libtbx.show_commands
echo " "
echo "** RUNNING libtbx.help"
echo " "
libtbx.help -k symmetry
# mmtbx dispatchers
echo " "
echo "** RUNNING mmtbx.pdb_interpretation"
echo " "
mmtbx.pdb_interpretation $CEXAM/toxd/toxd.pdb
