[MMTK] MMTK with VMD on Mac OSX
Ryan Bannen
rmbannen at wisc.edu
Thu Jul 21 00:40:44 CEST 2005
Greetings to the readers of the MMTK list,
I'm trying to get MMTK to communicate properly with VMD when running scripts
on a Mac OSX computer. I can get VMD running happily by typing
/usr/local/bin/vmd somepdbfile.pdb
and can run MMTK scripts that do not require the "view" command from the
console window by typing the filename of the python script. This leads me to
believe that both programs are properly installed.
I think that the $PDBVIEWER variable is pointing to the right VMD executable
file. For example when i type:
echo $PDBVIEWER
it returns the following:
/Applications/VMD_1.8.2/VMD_1.8.2.app/Contents/vmd/vmd_MACOSX
I'm using "fastnm.py" as my script to test the installation. (I've pasted the
code at the end of this email). Everything seems to run properly through the
two writeToFile commands. However, when the script tries to run the
"view(modes[6], 10.)" command, the following is output to the console:
Warning: No viewer with animation feature defined.
I'm at a loss for how to fix this problem. I would think that it's some
simple fix in some configuration file, but I wouldn't know where to start
looking. Help from anyone would be greatly appreciated : )
Thanks!
ryan.
================fastnm.py====================
#!/usr/local/bin/python
from MMTK import *
from MMTK.Proteins import Protein
from MMTK.ForceFields import DeformationForceField
from MMTK.FourierBasis import FourierBasis, estimateCutoff
from MMTK.NormalModes import NormalModes, SubspaceNormalModes
from MMTK.Visualization import view
universe = InfiniteUniverse(DeformationForceField())
universe.protein = Protein('/Users/badmin/Desktop/1iro.pdb', model='calpha')
# Find a reasonable basis set size and cutoff
nbasis = max(10, universe.numberOfAtoms()/8)
cutoff, nbasis = estimateCutoff(universe, nbasis)
print "Calculating %d low-frequency modes." % nbasis
if cutoff is None:
# Do full normal mode calculation
modes = NormalModes(universe)
else:
# Do subspace mode calculation with Fourier basis
subspace = FourierBasis(universe, cutoff)
modes = SubspaceNormalModes(universe, subspace)
conf = universe.configuration()
scale = 15.
for n in [6]:
universe.writeToFile('mode%d_plus.pdb' % n, conf+scale*modes[6])
universe.writeToFile('mode%d_minus.pdb' % n, conf-scale*modes[6])
view(modes[6], 10.)
==========================================
More information about the mmtk
mailing list