Eigenstate / vmd-python

Installable VMD as a python module
Other
129 stars 24 forks source link

Can't use topotools::mergetools when evaluating a tcl script. #45

Closed GregorySchwing closed 1 year ago

GregorySchwing commented 1 year ago

A tcl script which runs find using vmd version "VMD for LINUXAMD64, version 1.9.3 (November 30, 2016)"

like this $ vmd < scripts/merge_protein_and_solvent_box.tcl

Or starting the tkconsole and sourcing the script, also works fine.

Fails when using it like this

from vmd import evaltcl ions = evaltcl("source scripts/merge_protein_and_solvent_box.tcl

problem.zip

GregorySchwing commented 1 year ago

Traceback (most recent call last): File "scripts/amber_2_charmm.py", line 28, in ions = evaltcl("source scripts/merge_protein_and_solvent_box.tcl") ValueError: invalid command name "TopoTools::mergemols"

jvermaas commented 1 year ago

Where are you doing a package require topotools or similar in there? That is what gives you TopoTools::mergemols. "Normal" VMD will load some set of packages automatically, but vmd-python does not do that by default.

GregorySchwing commented 1 year ago

That worked. Thanks