leeping / forcebalance

Systematic force field optimization.
Other
146 stars 75 forks source link

How can we improve path handling? #42

Open leeping opened 10 years ago

leeping commented 10 years ago

ForceBalance carries out many calculations by using system calls to MD software such as Gromacs and TINKER. It will search for the executables in the directory specified by the tinkerpath or gmxpath option in the input file - but if this option is not present, it uses the which command to figure out the location from the $PATH environment variable.

The problem is that a single calculation may be carried out on many different machines. In the case of thermodynamic property fitting and "remote" targets, ForceBalance distributes the calculation using Work Queue and the MD software might not be installed in the same place on the remote computer. The possible solutions are:

1) Pass the tinkerpath, gmxpath, etc. options to all remote calculations and expect that all machines have the software installed in the same place.

2) Use the tinkerpath, gmxpath, etc. options only for local calculations and rely on $PATH for remote calculations.

3) Eliminate all tinkerpath and gmxpath options and expect the user to always have these programs in $PATH.

4) Some other clever solution that I haven't thought of.

I like option 3 because it reduces confusion for the user, but it only works if ForceBalance is compatible with default (unhacked) versions of the MD software. This is currently the case with GROMACS, OpenMM and TINKER, though I believe a small hack is still required for AMBER. (On the other hand, I don't know anyone who currently uses the AMBER interface.)

I am bringing this up now because until recently, ForceBalance has required a modified version of TINKER, but now it works with the official TINKER. We should be moving towards total compatibility toward regular versions of MD software.

Let me know what you think.

jayponder commented 10 years ago

Hi Lee-Ping,

I also vote for method (3).

Marie has now switched to the “new” ForceBalance, compatible with TINKER 6.3. Thinks for making those modifications so quickly. I (or Marie) will keep you posted as the water refinement progresses.

Best, Jay

On Feb 14, 2014, at 1:26 PM, Lee-Ping notifications@github.com wrote:

ForceBalance carries out many calculations by using system calls to MD software such as Gromacs and TINKER. It will search for the executables in the directory specified by the tinkerpath or gmxpath option in the input file - but if this option is not present, it uses the which command to figure out the location from the $PATH environment variable.

The problem is that a single calculation may be carried out on many different machines (in the case of thermodynamic property fitting), and the MD software might not always be installed in the same place. The two naive solutions are:

1) Pass the tinkerpath, gmxpath, etc. options to all remote calculations and expect that all machines have the software installed in the same place.

2) Use the tinkerpath, gmxpath, etc. options only for local calculations and rely on $PATH for remote calculations.

3) Eliminate all tinkerpath and gmxpath options and expect the user to always have these programs in $PATH.

4) Some other clever solution that I haven't thought of.

I like option 3 because it reduces confusion for the user, but it only works if ForceBalance is compatible with default (unhacked) versions of the MD software. This is currently the case with GROMACS, OpenMM and TINKER, though I believe a small hack is still required for AMBER. (On the other hand, I don't know anyone who currently uses the AMBER interface.)

I am bringing this up now because until recently, ForceBalance has required a modified version of TINKER, but now it works with the official TINKER. We should be moving towards total compatibility toward regular versions of MD software.

Let me know what you think.

— Reply to this email directly or view it on GitHub.

Jay W. Ponder Phone: 1-314-935 4275 Chemistry, Campus Box 1134 Fax: 1-314-935 4481 Washington University in St. Louis One Brookings Drive Email: ponder@dasher.wustl.edu St. Louis, Missouri 63130 USA WWW: http://dasher.wustl.edu/

leeping commented 10 years ago

Thanks for the feedback; I'm currently ruling out the potential possibilities that would require program paths in the input file. I do remember needing to hack AMBER for gradient calculations in a trajectory loop, but it might be a sufficiently "fringe" case to ignore. (I haven't used ForceBalance/AMBER in a while.)

leeping commented 10 years ago

4) Another option would be to include an optional .fbrc file in the user's home directory that points to program paths. This could fall under "advanced usage" since 99% of use cases do not require custom paths to MD software. It also solves the issue with MD software being installed in different locations.