Hi Eric,
Thank you so much for reporting the inconsistency issues with
trollop.rb in 3DNA.
lib/README says that trollrop should be downloaded from http://gitorious.org/trollop/mainline/blobs/raw/master/lib/trollop.rb,
The note was intended for myself, that I downloaded trollrop 1.16.2 using
wget from that URL. The
trollop.rb script is cleaned up (see below) and distributed with 3DNA, so users do not need a separate download.
# Note from Xiang-Jun Lu (3dna.lu@gmail.com) -- some minor revisions:
# o reformatted the code, 4 spaces indent, split long lines
# o corrected '-h' or '--version' to '-v'
# o corrected 'In thise case' to 'this'
# o removed '=> e' to avoid warning on unsed variable
# o refined FLOAT_RE to allow for + before the number
# o added [INTEGER_RE = /^[+-]?\d+$/] to allow for negative integer
To avoid confusions, the README file has been
removed in the updated distribution of 3DNA v2.4.
while post http://forum.x3dna.org/md-simulations/ruby-scripts-for-the-analysis-of-md-simulation-trajectories/msg538/#msg538 says from http://trollop.rubyforge.org/
trollrop is available from https://rubygems.org/gems/trollop/versions/
The post was dated on January 19, 2011, the URL for trollop was at the specific URL at that time. As you noticed, the URL for trollop has been changed again. Trollop may be relocated to yet another place (e.g., github) in the future.
Also, note that the
'trollop' gem has been deprecated and has been replaced by 'optimist'. In the 3DNA v2.4 distribution, the
lib/trollop.rb single file is
not a Rubygem dependency. It is a standalone "commandline option parser for Ruby that just
gets out of your way." (
http://manageiq.github.io/optimist/) It was for this
simplicity that I initially picked up trollop from several other options. I've been happily using trollop since then in my Ruby scripts.
any recommendation about specific version to use ? v1.16.2 or newer version will fit the requirements ?
The slightly revised version of
trollop v1.16.2 distributed with 3DNA has been working well, as far as I am aware.
Best regards,
Xiang-Jun
PS. Did you tried 3DNA v2.4.1 with zsh and confirm that the x3dna_setup script works as expected, or otherwise?