<commit_before>#! /bin/bash

if [ "$1" = "--help" ]; then
   echo This script calcs the x-density for gromacs
   echo for the AdResS therm force
   echo Usage: ${0##*/}
   echo USES: get_from_mdp csg_get_property awk log run_or_exit g_energy csg_taillog die
   echo NEEDS: cg.inverse.gromacs.equi_time cg.inverse.gromacs.first_frame
   exit 0
fi

check_deps "$0"


dt=$(get_from_mdp dt "grompp.mdp")
equi_time="$(csg_get_property cg.inverse.gromacs.equi_time 0)"
first_frame="$(csg_get_property cg.inverse.gromacs.first_frame 0)"
nsteps=$(get_from_mdp nsteps "grompp.mdp")

name=$(csg_get_interaction_property name)


mdp="$(csg_get_property cg.inverse.gromacs.mdp "grompp.mdp")"
[ -f "$mdp" ] || die "${0##*/}: gromacs mdp file '$mdp' not found"
adress_type=$(get_from_mdp adress_type "$mdp")

echo "Calculating $adress_type density"

#TODO implement property to read -sl from xml file
begin="$(awk -v dt=$dt -v frames=$first_frame -v eqtime=$equi_time 'BEGIN{print (eqtime > dt*frames ? eqtime : dt*frames) }')"


if [ $adress_type = "sphere" ]
then
dens_prog="g_rdf -n index.ndx"
index_sel="DUM \n SOL\n"
else
dens_prog="g_density -sl 500 -d x"<commit_msg>bin setting changed<commit_after>#! /bin/bash

if [ "$1" = "--help" ]; then
   echo This script calcs the x-density for gromacs
   echo for the AdResS therm force
   echo Usage: ${0##*/}
   echo USES: get_from_mdp csg_get_property awk log run_or_exit g_energy csg_taillog die
   echo NEEDS: cg.inverse.gromacs.equi_time cg.inverse.gromacs.first_frame
   exit 0
fi

check_deps "$0"


dt=$(get_from_mdp dt "grompp.mdp")
equi_time="$(csg_get_property cg.inverse.gromacs.equi_time 0)"
first_frame="$(csg_get_property cg.inverse.gromacs.first_frame 0)"
nsteps=$(get_from_mdp nsteps "grompp.mdp")

name=$(csg_get_interaction_property name)


mdp="$(csg_get_property cg.inverse.gromacs.mdp "grompp.mdp")"
[ -f "$mdp" ] || die "${0##*/}: gromacs mdp file '$mdp' not found"
adress_type=$(get_from_mdp adress_type "$mdp")

echo "Calculating $adress_type density"

#TODO implement property to read -sl from xml file
begin="$(awk -v dt=$dt -v frames=$first_frame -v eqtime=$equi_time 'BEGIN{print (eqtime > dt*frames ? eqtime : dt*frames) }')"


if [ $adress_type = "sphere" ]
then
dens_prog="g_rdf -n index.ndx -bin 0.01"
index_sel="DUM \n CG\n"
else
dens_prog="g_density -n index.ndx -sl 100 -d x"
{'fraction_non_alphanumeric': 0.1432225063938619, 'fraction_numerical': 0.00980392156862745, 'mean_word_length': 5.002557544757034, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2327433', 'n_tokens_mistral': 1004, 'n_tokens_neox': 943, 'n_words': 231}