VMD-L Mailing List
From: Vlad Cojocaru (Vlad.Cojocaru_at_eml-r.villa-bosch.de)
Date: Tue Apr 17 2007 - 07:25:19 CDT
- Next message: Axel Kohlmeyer: "Re: RE: "which files to make a spatial grid?" => Bug for list command?"
 - Previous message: Philipp Schoen1: "RE: "which files to make a spatial grid?" => Bug for list command?"
 - Next in thread: Vlad Cojocaru: "Re: assignment of "measure contacts" output to tcl variables"
 - Reply: Vlad Cojocaru: "Re: assignment of "measure contacts" output to tcl variables"
 - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
 
Dear vmd users,
I thought of doing something like in the script below ($A, $B are 2 
selections). However "foreach {atom1 atom2} .." does not properly map 
the output of "measure contacts".
I realized that by checking the output of "measure contacts" but I 
couldnt figure yet how to assign that output to properly get the pair of 
atoms {$atom1 $atom2}. Can somebody give me a hint how to do that ?
Thanks
vlad
-------------------trial script 
---------------------------------------------------------
foreach {atom1 atom2} [measure contacts 8.0 $B $A] {
   set d [measure bond {$atom1 $atom2}]
   set resid1 [$atom1 get resid]
   set resname1 [$atom1 get resname]
   set atomname1 [$atom1 get name]
   set resid2 [$atom2 get resid]
   set resname2 [$atom2 get resname]
   set atomname2 [$atom2 get name]
   puts $cFILE "$atom1:$atomname1:$resname1:$resid1  
$atom2:$atomname2:$resname2:$resid2   $d"
   unset $atom1
   unset $atom2
   unset $atomname1
   unset $atomname2
   unset $resname1
   unset $resname2
   unset $resid1
   unset $resid2
   unset d
}
-- ---------------------------------------------------------------------------- Dr. Vlad Cojocaru EML Research gGmbH Schloss-Wolfsbrunnenweg 33 69118 Heidelberg Tel: ++49-6221-533266 Fax: ++49-6221-533298 e-mail:Vlad.Cojocaru[at]eml-r.villa-bosch.de http://projects.villa-bosch.de/mcm/people/cojocaru/ ---------------------------------------------------------------------------- EML Research gGmbH Amtgericht Mannheim / HRB 337446 Managing Partner: Dr. h.c. Klaus Tschira Scientific and Managing Director: Prof. Dr.-Ing. Andreas Reuter http://www.eml-r.org ----------------------------------------------------------------------------
- Next message: Axel Kohlmeyer: "Re: RE: "which files to make a spatial grid?" => Bug for list command?"
 - Previous message: Philipp Schoen1: "RE: "which files to make a spatial grid?" => Bug for list command?"
 - Next in thread: Vlad Cojocaru: "Re: assignment of "measure contacts" output to tcl variables"
 - Reply: Vlad Cojocaru: "Re: assignment of "measure contacts" output to tcl variables"
 - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
 



