From: Justin Gullingsrud (justin_at_ks.uiuc.edu)
Date: Fri Aug 04 2000 - 12:11:21 CDT

Hi,

I don't remember where the information is located in the docs, but there
is in fact a way to set bonds. The basic idea is to take an atom selection
and assign a bond list to the atoms in the selection. The syntax is a little
cumbersome, so I've written a script to make it easier. Cut and paste the
following out and source it from the command line.

I'm pretty sure we had a script once for reading CONECT records, but I
don't remember where it is now... If I find it, I'll post it here.

Hope this helps,

Justin

# This script generates a bondlist that connects all the atoms in the list
# in sequential order. For example,
#
# set ca [atomselect top "name CA"]
# set cabonds [bondlist [$ca list]]
# $ca set bondlist $cabonds
#
# will connect all the CA atoms. All other bonds to the selected atoms
# are destroyed.

proc bondlist { inds } {
  set newbonds {}

  # special case for first
  set first [lindex $inds 1]
  lappend newbonds "{${first}}"
  
  for { set i 1 } {$i < [expr [llength $inds] - 1] } { incr i} {
    set minilist {}
    set outerlist {}
    lappend minilist [lindex $inds [expr $i - 1]]
    lappend minilist [lindex $inds [expr $i + 1]]
    lappend outerlist $minilist
    lappend newbonds $outerlist
  }
  set last [lindex $inds [expr $i - 1]]
  lappend newbonds "{${last}}"
  return $newbonds
}

>
> Hi,
>
> I would like to draw some bonds between a metal ion and some sidechains
> from a mol2 or a PDB file with CONECT records. The standard way to read
> just a PDB and add the bonds by the distance criterion implemented in
> VMD does not work because the distances are to large. There are some
> non-standard residues, so it is a problem to put it into CHARMM to
> generate a PSF. Is there a third way?
> Can I add bonds over the command line (I found nothing in the manual)?
> Is there a way to get VMD to read the CONECT records and use them
> instead of its algorithm?
> Is there any external program available which generates a PSF file form
> such a PDB?
>
> Any help is appreciated!
>
> Thanks,
>
> Timm
> --
> Timm Essigke
> Freie Universitaet Berlin * Fachbereich Biologie, Chemie, Pharmazie *
> Institut fuer Chemie (Kristallographie) * Takustr. 6 * D-14195 Berlin *
> essigke_at_chemie.fu-berlin.de * http://www.chemie.fu-berlin.de/~essigke *
> Tel.: +49-30-838-54627 * Fax.: +49-30-838-53464
>

-- 
Justin Gullingsrud      3111 Beckman Institute
H: (217) 384-4220       I got a million ideas that I ain't even rocked yet...
W: (217) 244-8946       -- Mike D