VMD-L Mailing List
From: Negar Ashari Astani (negarastani_at_gmail.com)
Date: Tue Feb 07 2017 - 04:28:31 CST
- Next message: Statics Eng: "Topo file"
- Previous message: sunyeping: "Re: vmd cannot display part of the protein in gromacs gro/trr file format"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Dear all,
I was using Axel's script for density animating, yet I didn't manage to
make it work for two opposite sign isosurface representations (to be used
for spin density).
Would be great if someone can help.
Here is the script I am using:
set updmol [mol new {SPINDEN..64101.cube} type cube waitfor all]
mol addfile {SPINDEN..64101.cube} type cube waitfor all
mol addfile {SPINDEN..64201.cube} type cube waitfor all
mol addfile {SPINDEN..75701.cube} type cube waitfor all
mol delrep 0 top
mol representation CPK 1.000000 0.300000 10.000000 10.000000
mol color Name
mol selection {all}
mol material Opaque
mol addrep top
mol color ColorID 17
mol representation Isosurface -0.001110 0 0 0 1 1
mol selection {all}
mol addrep top
mol color ColorID 7
mol representation Isosurface 0.001110 0 0 0 1 1
mol selection {all}
mol addrep top
# store name of the isosurface representation (id=2) for later use
set updrep [mol repname top 1] #This is green color 7 that updates in updrep
# store name of the isosurface representation (id=3 for later use
set updrep2 [mol repname top 2]
mol rename top {Golden Shot}
proc update_iso {args} {
global updmol
global updrep
global updrep2
# get representation id and return if invalid
set repid [mol repindex $updmol $updrep]
if {$repid < 0} { return }
set repid2 [mol repindex $updmol $updrep2]
if {$repid2 < 0} { return }
# update representation but replace the data set
# id with the current frame number.
set frame [molinfo $updmol get frame]
lassign [molinfo $updmol get "{rep $repid}"] rep
lassign [molinfo $updmol get "{rep $repid2}"] rep2
mol representation [lreplace $rep 2 2 $frame]
mol modrep $repid $updmol
mol representation [lreplace $rep2 2 2 $frame]
mol modrep $repid2 $updmol
}
Many thanks,
Negar
-- Negar Ashari-Astani, PhD Sharif university of technology, Department of Physics Room 519 Tel: (+98)2166164504
- Next message: Statics Eng: "Topo file"
- Previous message: sunyeping: "Re: vmd cannot display part of the protein in gromacs gro/trr file format"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]