From: John Stone (johns_at_ks.uiuc.edu)
Date: Mon Feb 25 2002 - 13:17:44 CST

Dear Alan,
  I have a couple of immediate suggestions that will give you better
results than your current method using PDB files, for the reasons below.

PDB file method:
  The behavior you describe with making a PDB file containing surface
points is to be expected, VMD assumes that the contents of the PDB
file are actually atoms, not just arbitrary points, so it attempts to
find bonds between the atoms, leading to the messages you describe
complaining about too many bonds (points are too close together, so
VMD thinks they are all bonded...)

Improved methods:
  From the information you've given me, it seems that the best immediate
solution would be to use the VMD graphics commands to draw points at the
positions extracted from your data files. This will not have any of the
problems of the PDB method, and will be easy to convert to using more
advanced methods such as I mention in options 4) and 5) in my original
reply. Since the output format from your Connelly subtroutine does not
include potential values, I assume that you are assigning these through the
use of a separate program or script? If you can output potential values
in a 3-D grid, then you can use option 4) as soon as I have it running,
and you could also use the potential grid to color any other VMD
representations you like. We can talk about this more as I make progress
on the new rendering code to do this. In the mean time, here's an easier
way to get a point cloud representation from VMD without making intermediate
PDB files (and their attendant difficulties), in pseudo-Tcl:

  # (loop over all surface points)
  for {set i} {$i < numpoints} {incr i} {
    # map potential values to colors here...
    # see "tricolor_scale" and other routines in user's guide examples...
    # http://www.ks.uiuc.edu/Research/vmd/vmd-1.7.1/ug/node186.html
    draw color $c

    # extract surface points from files or lists here
    # see Tcl guides for reading files in Tcl scripts..
    # set x, y and z

    # draw geometry here...
    # http://www.ks.uiuc.edu/Research/vmd/vmd-1.7.1/ug/node167.html
    draw point { $x $y $z }
  }

Let us know if you need help getting your script going, this should
be an easy one to bang out.. You can use the same sorts of scripts to
draw quite complex stuff in VMD, adding your own geometry into molecular
scenes. It gets tricky if you want to have multiple simultaneous graphics
molecules, but its not too bad.

  John Stone
  vmd_at_ks.uiuc.edu

On Mon, Feb 25, 2002 at 03:40:57PM -0500, Alan Wilter Sousa da Silva wrote:
> Dear Dr. Stone,
>
> I should worship you.
>
> We use a subroutine done by Connelly and one of the output is (the
> most complete) something like that:
>
> 3 2 -0.46880871 -2.60773206 -4.40835810 0.18325105 -0.85492104 0.29627359 0.42583075 0
> (1)(2) ( 3 ) ( 4 ) ( 5 ) (6)
>
> c Where:
> c The first field (I5) contains the atom number. The second
> c field (I2) is 1 for convex surface, 2 for saddle surface, 3 for
> c concave surface. The third through fifth fields give the coordinates
> c of the surface point. The remaining fields are optional and depend
> c on the attention number specified for the atom. The remaining fields
> c are: area, normal vector, buried flag. The records of this file are
> c not in atom number order, so they must be sorted if the user desires
> c to reference the surface points by atom number.
>
> The particularly important about this program is one can plot only
> intermolecular surface if one wants.
> Normally, we reformat this output to a pdb format without 'CONECT'.
> When one loads it in VMD many errors messages appears (since VMD 1.7,
> before not):
> >ERROR) Residue exceeded maximim number of bonds (4).
> ...
>
> >Unusual bond between residues 83 and 110
> ...
> But it's not quite relevant since I believe you've change VMD, so
> psf file can be neglected. And it works since I can view a cloud of a lot
> of points resembling the Connelly surface of the molecule, and using
> appropriate colour method I can see electrostatic potential distribution.
> Summarising, if VMD could connect the points by small surfaces...
>
> So, we don't have connectivity and no order.
>
> I'm studying potsurf script and I'm figuring out that I have to
> use the command 'mol volume .....' but I can't find much about it (even
> in the new Manual VMD 1.7.1).
>
> Anyway, methinks option (4) and (5) should be what I'm looking
> for.
>
>
> On Mon, 25 Feb 2002, John Stone wrote:
>
> >
> >
> > Dear Alan,
> > From what you describe in your email, it shouldn't be too hard to get
> > VMD to render what you want. Off the top of my head, there are two obvious
> > routes to getting this done. The appropriate method will depend on how
> > your program works, and what data it outputs:
> > 1) If your program outputs a regularly spaced rectilinear grid of data
> > points, with potential values at the grid points, then the best method
> > would be to write a simple Tcl script to read in the potential map,
> > and apply it as the coloring on an MSMS surface, as is done in the
> > potsurf script.
> >
> > 2) If your program outputs a list of discrete points (not in a grid, just
> > list of points which are not on a regular sample interval) then you could
> > use a Tcl script to read in the list of points, and draw them with the
> > VMD graphics commands. This assumes that your list of points does not
> > include any connecttivity information.
> >
> > 3) Similar to 2), but if you have connectivity information, you can
> > draw a solid surface much like MSMS, or Surf. Instead of reading in
> > the sample points as points, they are used as vertices in a triangle
> > mesh with the face/edge/vertex connectivity information.:w
> >
> > 4) Similar to 1), but using a feature I'm still developing, which would
> > allow any molecular geomtry to be colored by volumetric data, using
> > 3-D texture mapping.
> >
> > 5) Similar to 2) but using a feature I'm still developing, which will
> > allow VMD to draw big point clouds efficiently. May also implement a
> > mode for displaying vector fields...
> >
> > Let me know which of these options interests you the most, and I'll work with
> > you to get your program and scripts working with VMD.
> >
> > Thanks for using VMD!
> > John Stone
> > vmd_at_ks.uiuc.edu
> >
> >
> > On Mon, Feb 25, 2002 at 01:15:52PM -0500, Alan Wilter Sousa da Silva wrote:
> > > Hi VMD-list.
> > >
> > > Amazing, fantastic VMD!
> > >
> > > But I have a problem. Since I don't have Insight/Delphi, I'm
> > > trying to plot elect. pot. molecular surface with what I have.
> > > (1) First, loading a pdb file with charges (using beta or
> > > occupancy column). Then using MSMS and change colour represantation (RWB)
> > > to beta (or occupancy, whatever I set in the pdb file) results look fine
> > > but I don't think it's right, I mean, (2) I would like to see a surface
> > > composed of discretes points and had accounted every atom charge
> > > interaction (Coulomb, epslon=80) over every point of the grid surface.
> > > Maybe, it's what potsurf script does, but not what (1) does.
> > > So, I have a Connolly adapeted program to our situation, which
> > > calculates a point-surface (Connolly, probe 1.4) with charges values
> > > attributed as desired in (2) but now I'm looking for a way to show it as
> > > a graphic surface.
> > > I'm sorry if I couldn't make myself clear, but I want to find a
> > > way to make VMD represents my data source in a surface.
> > > My point-surface data is built by as many as need points to cover
> > > the molecular Connolly surface with each point having its 3 spatial
> > > coordnates and its charge value (using pdb format I can see a sketch of
> > > what I expect).
> > > I would thank in advance any attention dedicated to my problem.
> > >
> > > Sincerely,
> > >
> > > -----------------------
> > > Alan Wilter S. da Silva
> > > -----------------------
> > > Laboratório de Física Biológica
> > > Instituto de Biofísica Carlos Chagas Filho
> > > Universidade do Brasil/UFRJ
> > > Rio de Janeiro, Brasil
> >
> >
>
> --
> -----------------------
> Alan Wilter S. da Silva
> -----------------------
> Laboratório de Física Biológica
> Instituto de Biofísica Carlos Chagas Filho
> Universidade do Brasil/UFRJ
> Rio de Janeiro, Brasil

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349              
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078