Commit 0b3601f0 authored by Christoph Junghans's avatar Christoph Junghans

potential_to_lammps.sh: add option to scale y-axis

parent d73f74ce
Pipeline #86639636 passed with stages
in 347 minutes and 16 seconds
#!/bin/bash
#
# Copyright 2009-2018 The VOTCA Development Team (http://www.votca.org)
# Copyright 2009-2019 The VOTCA Development Team (http://www.votca.org)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......@@ -115,9 +115,17 @@ else
scale="${input}"
fi
y_scale=$(csg_get_interaction_property inverse.lammps.y_scale)
if [[ ${y_scale} != 1 ]]; then
yscale="$(critical mktemp ${trunc}.pot.yscale.XXXXX)"
do_external table linearop "${scale}" "${yscale}" "${y_scale}" "0"
else
yscale="${scale}"
fi
#keep the grid for now, so that extrapolate can calculate the right mean
smooth="$(critical mktemp ${trunc}.pot.smooth.XXXXX)"
critical csg_resample --in ${scale} --out "$smooth" --grid "${table_begin}:${step}:${table_end}"
critical csg_resample --in ${yscale} --out "$smooth" --grid "${table_begin}:${step}:${table_end}"
extrapol="$(critical mktemp ${trunc}.pot.extrapol.XXXXX)"
lfct="$(csg_get_interaction_property --allow-empty inverse.$sim_prog.table_left_extrapolation)"
......@@ -139,4 +147,5 @@ do_external convert_potential tab --header "${sim_prog}" --type "${bondtype}" "$
if [[ $clean ]]; then
rm -f "${smooth}" "${interpol}" "${extrapol}" "${tshift}"
[[ ${input} != ${scale} ]] && rm -f "${scale}"
[[ ${input} != ${yscale} ]] && rm -f "${yscale}"
fi
......@@ -375,7 +375,7 @@
<DESC>do the given number of iterations (0=inf)</DESC>
</iterations_max>
<kBT>
<DESC> kBT in simulation progam units (XXX K *0.00831451 for gromacs)</DESC>
<DESC> kBT in KJ/mol (i.e. XXX K *0.00831451)</DESC>
</kBT>
<log_file>inverse.log
<DESC>name of the log file</DESC>
......@@ -545,11 +545,14 @@
<lammps>
<DESC>lammps specific options for this interations</DESC>
<scale>1
<DESC>scaling factor for the potential output, can be used to convert VOTCA units, nm, to other units, e.g. angstroms</DESC>
<DESC>x-axis scaling factor for the potential output, can be used to convert VOTCA units, nm, to other units, e.g. angstroms</DESC>
</scale>
<table>
<DESC>Name of file for tabulated potential of this interaction. This fill will be created from the internal tabulated potential format in every step. Note, though, that the lammps script needs to contain the name of that table as the tabulated interaction and the interaction is stored in the VOTCA section of the file..</DESC>
</table>
<y_scale>1
<DESC>y-axis scaling factor for the potential output, can be used to convert VOTCA units, kJ/mol, to other units, e.g. kcal/mol</DESC>
</y_scale>
</lammps>
<post_add>
<DESC>Additional post processing of U after dU added to potential. This is a list of scripts separated by spaces which are called. See section on iterative framework for details.</DESC>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment