1#!/usr/local/bin/bash
2#
3# Copyright 2009-2011 The VOTCA Development Team (http://www.votca.org)
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9#     http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#
17
18if [ "$1" = "--help" ]; then
19cat <<EOF
20${0##*/}, version %version%
21This script implements extrapolation undefined region of the potential update (.dpot)
22
23Usage: ${0##*/} infile outfile
24EOF
25   exit 0
26fi
27
28[[ -z $1 || -z $2 ]] && die "${0##*/}: Missing arguments"
29
30[[ -f $2 ]] && die "${0##*/}: $2 is already there"
31
32name=$(csg_get_interaction_property name)
33avg_points=$(csg_get_interaction_property inverse.post_update_options.extrapolate.points)
34
35echo "extrapolate potential for interaction $name"
36
37tabtype="$(csg_get_interaction_property bondtype)"
38do_external potential extrapolate --type "$tabtype" --avg-points "$avg_points" "$1" "$2"
39
40