Re: Get NAMD version from the tcl script interface

From: yjcoshc (yjcoshc_at_gmail.com)
Date: Wed May 09 2018 - 19:51:23 CDT

Thanks for your suggestions! I have found the output of `./namd2
2>/dev/null | grep Info: |grep NAMD|head -1|cut -d ' ' -f 3` is what I need.

Haochuan Chen

在 2018年05月09日 23:43, Ajasja Ljubetič 写道:
> Hehe, yes, it's not a valid option, but if I called only `namd` then
> it would sleep for 10 seconds.
> On an invalid option NAMD exits immediately.
>
> Best,
> Ajasja
>
> On Wed, 9 May 2018 at 17:38, Brian Radak <brian.radak_at_gmail.com
> <mailto:brian.radak_at_gmail.com>> wrote:
>
> I don't know of any such option "--version" for NAMD, although
> it's true you can extract the version from a run by using grep, etc.
>
> On Wed, May 9, 2018 at 11:06 AM, Ajasja Ljubetič
> <ajasja.ljubetic_at_gmail.com <mailto:ajasja.ljubetic_at_gmail.com>> wrote:
>
> Hi,
>
> since you have the full power of TCL, I guess you could hack
> it by saving the output of the command
>
> `namd --version | grep Info: | head -1 | cut -d ' ' -f 3`
>
> to a tcl variable. I guess exec
> <https://www.tcl.tk/man/tcl8.5/tutorial/Tcl26.html> could be
> used.  Or maybe save the namd version to a shell variable
> before running namd and retrieving it in the script.
>
> Best,
> Ajasja
>
> On Wed, 9 May 2018 at 16:38, Brian Radak
> <brian.radak_at_gmail.com <mailto:brian.radak_at_gmail.com>> wrote:
>
> Actually I think this feature is still awaiting final
> comment. It might be available in the nightly build in a
> few weeks, but, as you said, only for the 2.12 development
> version or even just the 2.13 release.
>
> On Wed, May 9, 2018 at 7:50 AM, Giacomo Fiorin
> <giacomo.fiorin_at_gmail.com
> <mailto:giacomo.fiorin_at_gmail.com>> wrote:
>
> You cannot for versions up to 2.12, but the feature
> has just been added.
>
> Giacomo
>
> On Wed, May 9, 2018 at 4:36 AM, yjcoshc
> <yjcoshc_at_gmail.com <mailto:yjcoshc_at_gmail.com>> wrote:
>
> Hello,
>
> I am trying to append the NAMD version string to
> the output file names. In the NAMD configuration
> file if I use:
>
> outputName output/dihedral_$namd_version
>
> how can I get the NAMD version from the tcl
> interface and store it into the namd_version variable?
>
> Thanks,
>
> Haochuan Chen
>
>
>
>
> --
> Giacomo Fiorin
> Associate Professor of Research, Temple University,
> Philadelphia, PA
> Contractor, National Institutes of Health, Bethesda, MD
> http://goo.gl/Q3TBQU
> https://github.com/giacomofiorin
>
>
>

This archive was generated by hypermail 2.1.6 : Tue Sep 17 2019 - 23:19:52 CDT