From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Mon Sep 25 2006 - 10:01:46 CDT

On 9/25/06, FyD <fyd_at_u-picardie.fr> wrote:
> Quoting John Stone <johns_at_ks.uiuc.edu>:
> >
> > Did you try the "charge" coloring method yet?
>
> Yes, but the charge _values_ are NOT displayed, colors are displayed.
> Is it possible to display the charge _values_ (in fact, a label like
> the atom name) ?

francois,

ok, we have a little misunderstanding in the language here.

what you want to do can be achieved by VMD scripting. e.g. with

set mid [mol new ahl8-charge.mol2]
set sel [atomselect $mid {all}]
set offset {0.0 0.3 0.3}
graphics $mid color white

foreach pos [$sel get {x y z}] q [$sel get charge] {
     set txt [printf "%05.3f" $q]
     graphics $mid text [vecadd $offset $pos] $txt size
}

in fact, this could be turned into extension plugin with a similar interface
as the dipole watch plugin that i deposited on the biocore recently.

cheers,
   axel.
>
> Thanks, Francois
>
> >> And what about visualizing charge _values_ in a 'simple' file like for
> >> instance .pqr or .mol2 file ? How to do that with VMD ?
> >
> >> >you have multiple options depending on what format you have
> >> >the charge information in. i assume that you have the charges
> >> >for the QM subsystem as partial charges that vary over the trajectory.
> >> >right?
> >> >
> >> >that information you can actually store in the User field, since this data
> >> >is per-frame. so in essence you need to combine the recepies for
> >> >the argon and the buckyball example to do this.
> >> >
> >> >if you first load the corresponding amber topology files, you'll also
> >> >get the partial MM charges embedded into your system. now
> >> >you can do two representations for the QM and the MM atoms
> >> >and use the Charge colorization on the MM and User for the QM
> >> >atoms and you should get something along the lines what you
> >> >desire. of course you can make even more restrictive selections.
> >> >
> >> >i'm very busy right now, but if you'd get back to me in a
> >> >couple of weeks, i'd be more than happy to include something like
> >> >this as an additional example into the tutorial. ...and we could also
> >> >use such a trajectory for a demo on the IR-spec plugin and a dipole
> >> >visualization plugin that was added to vmd shortly after the release
> >> >of version 1.8.5 (it is available from biocore).
> >>
> >> >>I have a large system, and I have charge data for just part of it
> >> >>(it's a QM/MM simulation). How can I use VMD to visualize the charges
> >> >>only in this part, or even better, only in specific atoms? (It could
> >> >>be with a change in color, or whatever other means people use for
> >> >>that.)
> >> >>(I saw the demo in Axel Kohlmeyer web page, but there he used a system
> >> >>of only 3 atoms. What I have are Amber files using ~5000 atoms, for
> >> >>which I have charges for only 140.)
>
>
>
>

-- 
=======================================================================
Axel Kohlmeyer   akohlmey_at_cmm.chem.upenn.edu   http://www.cmm.upenn.edu
  Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.