#!/bin/sh

if [ $# -lt 1 ]; then
    echo "Usage: $0 pdbfile [npbe/lpbe]"
    echo "npbe is default"
    echo "pdb2pqr.py and apbs_geninp.py should be in PATH"
    exit 1
fi

if [ "x${2}" == "x" ]; then
    solver="npbe"
else
    solver="${2}"
fi

pdb2pqr.py --ff=charmm ${1} ${1}.pqr
apbs_geninp.py ${1}.pqr ${solver} > ${1}.inp
apbs ${1}.inp

