From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Tue Jul 17 2012 - 11:22:07 CDT

On Tue, Jul 17, 2012 at 4:58 PM, DESPIAU-PUJO Emilie UJF
<emilie.despiau-pujo_at_cea.fr> wrote:
> Dear vmd users,
>
>
>
> I use .pdb files containing C and H atoms and I want to represent them as
> VDW spheres with dynamic bonds (different cutoff distances for C-C, C-H and
> H-H bonds).
>
> I can manage to render C-C and C-H dynamic bonds but I don't know how to
> deal with H-H bonds.
>
> Is it because VMD does not include H-H bonds in DynamicBonds drawing method
> ?

yes.

> Is there any possibility to circumvent this situation?

yes. rename the H atoms to something else,
so they don't get recognized as hydrogen. ;)
then fix up the color table and - if needed -
adjust the radius via script command using
atomselect.

axel.

> Here is what I use in my current .vmdrc file :

noooo. don't put these things into .vmdrc.

write a seprate script and then launch
VMD with: vmd -e myscript.vmd

or use the "load saved state" function
in the file menu.

make sure the script contains the
command to first load the file(s) you want
and does so with a "waitfor all" flag.

for details, refer to the scripting part of
the VMD user's guide.

cheers,
     axel.

> # render C and H atoms
>
> color Element C blue
>
> color Element H yellow
>
> display depthcue off
>
> mol modcolor 0 0 Element
>
> mol modstyle 0 0 VDW 0.4 12
>
> mol modselect 0 0 all
>
> # render H-H bonds
>
> mol addrep 0
>
> mol modcolor 1 0 Element
>
> mol modstyle 1 0 DynamicBonds 1.1 0.2 10
>
> mol modselect 1 0 {element H}
>
> # render C-H bonds
>
> mol addrep 0
>
> mol modcolor 2 0 Element
>
> mol modstyle 2 0 DynamicBonds 1.3 0.2 10
>
> mol modselect 2 0 {(element H and within 1.3 of element C) or (element C and
> within 1.3 of element H)}
>
> mol List
>
> # render C-C bonds
>
> mol addrep 0
>
> mol modcolor 3 0 Element
>
> mol modstyle 3 0 DynamicBonds 1.7 0.2 10
>
> mol modselect 3 0 {element C}
>
> mol List
>
>
>
> Could someone help me ?
>
> Many thanks,
>
> Emilie
>
>
>
> -------------------------------------------------------------------------------------------
>
> Emilie Despiau-Pujo
>
> LTM / CNRS-UJF-INPG
>
> (CEA/LETI/D2NT)
>
> 17 av. des Martyrs, 38054 Grenoble - France
>
> + 33 (0)4 38 78 48 12
>
>
>
>
>
>

-- 
Dr. Axel Kohlmeyer  akohlmey_at_gmail.com  http://goo.gl/1wk0
International Centre for Theoretical Physics, Trieste. Italy.