From: nahren manuel (meetnahren_at_yahoo.com)
Date: Wed Aug 31 2011 - 05:07:03 CDT

Hi, I have a peptide and the distance between two atoms, between 6 and 17  is say 2.300 A,then i need to do a translation such that , the initial coordinate ATOM      5  CLP ALADX  1    -0.700  0.540 -0.850        ATOM      6  OL  ALADX  1      0.000  0.000  0.000      ATOM    17  CRP ALADX  1    -4.070 -1.100 -0.090   is transformed to    ATOM      6  OL  ALADX  1      0.000  0.000  0.000      ATOM    17  CRP ALADX  1    2.300 0.000 0.000 Best, nahren ________________________________ From: John Stone <johns_at_ks.uiuc.edu> To: nahren manuel <meetnahren_at_yahoo.com> Cc: VMD <vmd-l_at_ks.uiuc.edu> Sent: Friday, August 5, 2011 11:35 PM Subject: Re: vmd-l: PDB manipulation Hi,   For a given atom selection, you can query the existing coordinates with "$sel get {x y z}" or similar script commands, and then compute whatever new coordinates you want, and then replace the existing coordinates with the new ones with "$sel set {x y z} ....." where .... is another Tcl list or list of lists, etc.  With this, you could write your own Tcl procedure to do any manipulation you like, including things not easily expressed with the built-in translation/rotation commands, etc. Cheers,   John Stone   vmd_at_ks.uiuc.edu On Fri, Jul 29, 2011 at 07:44:38AM -0700, nahren manuel wrote: >    Dear VMD users, >    I want to restrain two atoms.A(index 6, OL) and B(index 17, NR). >    ATOM      1  CL  ALA    1      16.626  18.862  20.798  1.00 >    1.00                      >    ATOM      5  CLP ALA    1      17.760  19.029  19.867  1.00 >    0.17          >    ATOM      6  OL  ALA    1      17.642  19.725  18.875  1.00 >    1.17                      >    ATOM    14  HB3 ALA    1      19.962  17.574  17.698  1.00 >    28.91          >    ATOM    15  CRP ALA    1      20.897  19.618  19.502  1.00 >    0.15          >    ATOM    16  OR  ALA    1      21.893  19.687  20.187  1.00 >    1.63          >    ATOM    17  NR  ALA    1      20.489  20.661  18.782  1.00  0.77      >    I move atom 6 to origin using >    $sel moveby "-17.642  -19.725  -18.875" >    >    ATOM      5  CLP ALADX  1    -0.700  0.540 -0.850  0.00  0.00      >    ATOM      6  OL  ALADX  1      0.000  0.000  0.000  0.00  0.00          >    ATOM    15  CRP ALADX  1    -4.070 -1.100 -0.090  0.00  0.00          >      >    ATOM    17  NR  ALADX  1    -4.200 -2.080  0.850  0.00  0.00      >    I want translate the above to have somethings like (irrespective of >    coordinates of other atoms) >        >    ATOM      6  OL  ALADX  1      0.000  0.000  0.000  0.00  0.00          >                >    ATOM    17  NR  ALADX  1      x.xxx  0.000 0.000 0.00  0.00 >    So that I can apply restraint between the atoms 6 and 17 along X-axis. >    Best regards, >    nahren -- NIH Resource for Macromolecular Modeling and Bioinformatics Beckman Institute for Advanced Science and Technology University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801 http://www.ks.uiuc.edu/~johns/          Phone: 217-244-3349 http://www.ks.uiuc.edu/Research/vmd/      Fax: 217-244-6078