[gmx-users] How VMD to display the velocity
Höfling Martin
martin.hoefling at gmx.de
Thu Mar 5 11:58:36 CET 2009
Am 05.03.2009 um 07:44 schrieb Dechang Li:
Not sure about VMD, but you can write a short script for pymol in
python:
1: reading velocities from gro
2: converting gro2pdb
3: read in pdb into pymol
4: create cgo object containing arrow (search in the list archives or
on the wiki page of pymol)
Best
Martin
Snippet for step 2 and 3:
def gro( fnm , name=None,state=1):
'''
Loads a gro gromacs File
@param fnm: filename to load
@param name: Name of object
@param state: state to load to
'''
tmpfile=mktemp(".pdb")
comd="editconf -f %s -o %s" % (fnm,tmpfile)
if os.system(comd):
print "Running command %s failed"%comd
return False
if name ==None:
cmd.load(tmpfile, fnm[:-4] ,state=state)
else:
cmd.load(tmpfile,name,state=state)
os.remove(tmpfile)
return True
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-users/attachments/20090305/21a8aafd/attachment.html>
More information about the gromacs.org_gmx-users
mailing list