Pallavi-Banerjee21 / votca

Automatically exported from code.google.com/p/votca
0 stars 0 forks source link

Simulation package-specific user scripts are not loaded #164

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add a user script for a simulation package-specific functions; for example, 
in csg_table:
functions gromacs functions_gromacs_own.sh

2. Observe the default one gets loaded instead of the user supplied one.

What version of the product are you using? On what operating system?
build.sh, version 1.9.5
votca version 1.3-dev hgid: 5ff9cbf59955
Scientific Linux

The problem arises because user supplied script directories are only loaded 
into $CSGSHARE after package-specific functions are sourced.
To fix it it suffices to swap the loading order in inverse.sh thus (line 117):

scriptpath="$(csg_get_property --allow-empty cg.inverse.scriptpath)"
[[ -n $scriptpath ]] && echo "Adding $scriptpath to csgshare" && 
add_to_csgshare "$scriptpath"

show_csg_tables

sim_prog="$(csg_get_property cg.inverse.program)"
echo "We are using Sim Program: $sim_prog"
source_function $sim_prog

Original issue reported on code.google.com by manuel.n...@gmail.com on 24 Mar 2015 at 12:59

GoogleCodeExporter commented 8 years ago
Good point, originally we didn't want to allow overwriting of functions, but 
after the simulation back-end functions got split out, keeping this approach 
doesn't make much sense anymore.

Original comment by christop...@gmail.com on 24 Mar 2015 at 2:58

GoogleCodeExporter commented 8 years ago

Original comment by christop...@gmail.com on 24 Mar 2015 at 3:00

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 6070fe9041ee.

Original comment by jungh...@votca.org on 24 Mar 2015 at 3:01