#!/bin/sh

# Low-level pipsa 2.0 script
# Converts uhbd check output files to pqr files
#
# - needs 3 parameters: 
# $1 = pipsa_distr_dir = pipsa distribution directory
# $2 = pipsa_uhbd_dir  = the directory where UHBD calculation 
#                        are already prepared by the script do_pipsa_UHBD_prep
#
# - assumes that do_pipsa_UHBD_prep and do_pipsa_UHBD_chk executed
# - will create directory pipsa_uhbd_dir/../pqrs and write pqr file there

cd $2/
mkdir ../pqrs

for i in `cat names`
do
$1/aux/uho2pqr < $i.uhbd_chk.ou > ../pqrs/$i.pqr
done

cd ../pqrs
ls -1 *.pqr > pqrnames
