Re: Problem with running namdenergy plugin from text interface

From: zeynab mohamad hoseyni (zmhoseyni_at_yahoo.com)
Date: Mon Sep 22 2014 - 22:29:26 CDT

Hi Josh,

Thanks a lot! It works with package require.
Thanks also for your explanation and your point about new version of vmd. I'll update
to the new one immediately.

All the Best,
Zeynab

On Monday, September 22, 2014 9:32 PM, Josh Vermaas <vermaas2_at_illinois.edu> wrote:
 

Hi Zeynab,
Instead of "package provide namdenergy 1.4", could you try "package
    require namdenergy"? The two have different behaviors (read about
    them: http://wiki.tcl.tk/1491), and you chose the wrong one. The reason it works if you don't run it using -e is that then VMD has loaded all of its packages, and namdenergy exists. From the text interface, all plugins need to be loaded explicitly with the appropriate package require command.
-Josh Vermaas

P.S. Have you tried the 1.9.2 beta? Alot of improvements have been
    made since 1.9, and while this error wasn't 1.9 specific, there were
    many features that have been significantly improved and added since
    then.

On 09/22/2014 02:53 PM, zeynab mohamad hoseyni wrote:

Dear all,

I run namdenergy using the following tcl script (calling run-namdenergy.tcl):
  set nfiles 10
  set str ./protein.psf
  for {set j 1} {$j <= $nfiles} {incr j} {

  mol new $str type psf waitfor all
  mol addfile glp1r_NPT-red_$j.dcd type dcd waitfor all
  package provide namdenergy 1.4
  set sell [atomselect top "protein"]
  set out out$j
  namdenergy -nonb -conf -sel $sell -cutoff 12 -switch 10 -pme -extsys namd-generated2.xsc -ofile $out -par par_all36_prot.prm
  mol delete all

 }

Whenever I source the tcl within vmd tkConsole the script works
but as soon as I use the following command
vmd -dispdev text -e run-namdenergy.tcl
I receive this error:

Info) Dynamically loaded 3 plugins in directory:

Info) /usr/local/lib/vmd/plugins/LINUX/molfile
vmd > package provide namdenergy 1.4
vmd > namdenergy
invalid command name "namdenergy"

I use vmd version 1.9. Can any one guide me?

Thanks in advance,
Zeynab

This archive was generated by hypermail 2.1.6 : Thu Dec 31 2015 - 23:21:15 CST