VMD-L Mailing List
From: Salvador H-V (chava09hv_at_gmail.com)
Date: Wed Mar 13 2013 - 17:46:25 CDT
- Next message: Josh Vermaas: "Re: Calculating rdfs without the VMD gui"
- Previous message: Josh Vermaas: "Re: Calculating rdfs without the VMD gui"
- In reply to: Josh Vermaas: "Re: Calculating rdfs without the VMD gui"
- Next in thread: Josh Vermaas: "Re: Calculating rdfs without the VMD gui"
- Reply: Josh Vermaas: "Re: Calculating rdfs without the VMD gui"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi again,
Thanks to all the previous suggestions. But still I can no make my script
to run and work properly.
First, I followed the suggestion of remove the command: set cell {} and
instead I used the command molinfo. Here it is my code:
============
*mol new gr1.xyz type xyz waitfor all*
*
*
*set nframes [molinfo top get numframes]*
*
*
*set solv [atomselect top "name O"]*
*
*
*molinfo top set a 68.44962167734951 *
*molinfo top set b 68.44962167734951 *
*molinfo top set c 68.44962167734951*
*
*
*molinfo top set alpha 90.0 *
*molinfo top set beta 90.0 *
*molinfo top set gamma 90.0*
*
*
*#set rdf [measure gofr $solv $solv delta 0.01 rmax 18.0 first 0 last [expr
{$nframes-1}] step 1] *
*set rdf [measure gofr $solv $solv delta 0.01 rmax 18.0 usepbc 1 selupdate
0 first 0 last [expr {$nframes-1}] step 1] *
*
*
*set ri [lindex $rdf 0]*
*set gr [lindex $rdf 1]*
*set rdf_out [open "rdf.dat" "w"]*
*
*
*foreach val1 $ri val2 $gr {*
* puts $rdf_out "$val1\t$val2"*
*}*
*close $rdf_out*
*exit*
==================
I got the following message:
*0*
*100*
*atomselect0*
*ERROR) measure gofr: unit cell volume is zero.*
*measure gofr: error during g(r) calculation.*
Next, I decided to use pbctools. I made a copỳ in my home directory of
.vmdrc file located at:* /usr/local/lib/vmd/* and I added the following
lines:
*set dir "/usr/local/lib/vmd/plugins/noarch/tcl/pbctools2.6/"*
*source $dir/pkgIndex.tcl*
*package require pbctools*
Now, the script looks like:
===========
*package require pbctools*
*
*
*mol new gr1.xyz type xyz waitfor all*
*
*
*pbc set cell "68.44962167734951 68.44962167734951 68.44962167734951"*
*
*
*set nframes [molinfo top get numframes]*
*set solv [atomselect top "name O"]*
*
*
*
*
*set rdf [measure gofr $solv $solv delta 0.01 rmax 18.0 usepbc 1 selupdate
0 first 0 last [expr {$nframes-1}] step 1]*
*
*
*set ri [lindex $rdf 0]*
*set gr [lindex $rdf 1]*
*set rdf_out [open "rdf.dat" "w"]*
*
*
*foreach val1 $ri val2 $gr {*
* puts $rdf_out "$val1\t$val2"*
*}*
*close $rdf_out*
*exit*
========================
But now I got the following message:
*ERROR: pbcset: unknown option: 68.44962167734951 68.44962167734951
68.44962167734951*
*100*
*atomselect0*
*ERROR) measure gofr: unit cell volume is zero.*
*measure gofr: error during g(r) calculation.*
Please let me know what I am doing wrong.
All the best,
SHV
- Next message: Josh Vermaas: "Re: Calculating rdfs without the VMD gui"
- Previous message: Josh Vermaas: "Re: Calculating rdfs without the VMD gui"
- In reply to: Josh Vermaas: "Re: Calculating rdfs without the VMD gui"
- Next in thread: Josh Vermaas: "Re: Calculating rdfs without the VMD gui"
- Reply: Josh Vermaas: "Re: Calculating rdfs without the VMD gui"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]