-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello Jeff--
>
> Does anyone have a vmd script to visualize a plane defined by
>
> A x + B y + C z + D = 0
>
> ie. the type of plane one might use for the planeDistPot.
>
In your case, the plane is actually specified by three atoms. The
attached script will use those points to represent a plane as a large
triangle. One can imagine various modifications/improvements.
To run the script, first start vmd-xplor. Then do
xplor -py -port <portNum> vmdTriPlane.py
Find portNum from vmd-xplor via
Control --> Info
best regards--
Charles
import protocol
protocol.loadPDB("phe.pdb")
xplor.simulation.deleteAtoms("not known")
from vec3 import Vec3
qc=Vec3(0,0,0)
qs=[]
for atom in AtomSel("resid 200 and (name CE1 or name CZ or name HZ)"):
qs.append( atom.pos() )
pass
for q in qs:
qc += q
pass
qc /= len(qs)
scale=10
vs=[]
for q in qs:
vs.append( scale*(q-qc) + qc )
pass
vlist=[]
for v in vs:
vlist+= v
pass
print vlist
from vmdInter import VMDInter
vmd=VMDInter()
cmds=[]
cmds.append("mol load graphics PLANE")
cmds.append("set planemol [molinfo top]")
cmds.append("graphics $planemol color yellow")
cmds.append("graphics $planemol materials off")
cmds.append("graphics $planemol triangle {%f %f %f} {%f %f %f} {%f %f %f}" %
tuple(vlist))
cmds.append("puts $errorInfo")
cmds.append("display resetview")
for cmd in cmds:
vmd.tclCommand( cmd+'\n' )
pass
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8+ <http://mailcrypt.sourceforge.net/>
iD8DBQFI0Q72PK2zrJwS/lYRAhVwAJ9ELZ92M1DxsCjx5Do6MmMtIshovgCfbpnG
ssjgmhNUpwu3JBsIy6P2kUA=
=SCec
-----END PGP SIGNATURE-----
_______________________________________________
Xplor-nih mailing list
[email protected]
http://dcb.cit.nih.gov/mailman/listinfo/xplor-nih