From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed May 05 2004 - 15:49:55 CDT

In addition to Axel's suggestion, one might consider setting the "User" field
with a Tcl script, with a 1.0 or 0.0 to indicate if the atom "exists" and
then use an atom selection with "user > 0.0" to only draw atoms that exist.
(don't forget to enable the "update selection every frame" button in the
 trajectory tab...)
That might be preferable to using special atom coordinates, since they'll
alter VMD's default viewing/scaling behavior, among other things.
In the longer term, I'd like to come up with a better solution for this
sort of thing, but there's no convenient way to retrofit VMD to handle this
that's non-intrusive, so tricks like using the atom coordinate or User field
with atom selections are probably the best short-term solution.

  John Stone
  vmd_at_ks.uiuc.edu

On Wed, May 05, 2004 at 08:22:24PM +0200, Axel Kohlmeyer wrote:
>
> >>> "CR" == Cosmin ROMAN <cosmin.roman_at_imag.fr> writes:
>
>
> CR> Hello,
>
>
>
> CR> Is there any possibility (or trick) to dynamically create and destroy =
> CR> atoms during an animation in VMD? For instance when simulating open =
> CR> systems one would often find himself in such a situation, i.e. having =
> CR> atoms going in and out of the simulation box continuously. Also, the =
> CR> bonds in this case should be updated dynamically. Can one set the number =
> CR> of atoms and the bonds for each frame individually? (When I am talking =
> CR> about dynamic bonds I am not referring to the drawing method having this =
> CR> name but rather to a more controllable version in which the user could =
> CR> provide the full list of bonds per frame.)
>
>
> CR> My input file is a generalized multi-frame XYZ file having different =
> CR> atom number and species for each frame.
>
>
> hi,
>
> not directly. the best i can think of, is to rewrite the
> trajectory file to contain a constant number of atoms, but
> to put the additional dummy atoms far away, say at z=-200.0
> and then use selections that have the additional requirement
> 'and z > -199.0'. note that the 'identity' of the atom type
> is only taken from the first frame, so that you have to add
> enough dummy atoms for all atom types, that you need.
>
> as for the dynamic bonds visualization, if you use several
> of these visualizations with different selections, you can
> create quite controlled bonds.
>
> other than that, you'd have to set the bonds fresh
> for each frame by tracing vmd_frame, which would be
> quite a performance killer.
>
> hope this helps,
> axel kohlmeyer.
>
>
>
> CR> Thank you for your support and patience,
>
> CR> Regards,
>
> CR> Cosmin
>
>
>
>
> CR> :*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:
> CR> :=20
> CR> Cosmin ROMAN, Ph.D. Student. =20
> CR> :
> CR> TIMA-INPG, MNS Group,
> CR> : 46 Avenue F=E9lix Viallet,
> CR> 38031 Grenoble Cedex, FRANCE.
> CR> :
> CR> Tel : 00 33 4 76 57 48 34
> CR> : Fax : 00 33 4 76 47 38 14
> CR> e-mail : cosmin.roman_at_imag.fr
> CR> :
> CR> :*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:
> CR> ------=_NextPart_000_0B5B_01C432CA.20F2C460
> CR> Content-Type: text/html;
> CR> charset="Windows-1252"
> CR> Content-Transfer-Encoding: quoted-printable
>
> CR> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> CR> <HTML><HEAD>
> CR> <META http-equiv=3DContent-Type content=3D"text/html; =
> CR> charset=3Dwindows-1252">
> CR> <META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
> CR> <STYLE></STYLE>
> CR> </HEAD>
> CR> <BODY bgColor=3D#ffffff>
> CR> <DIV><FONT face=3DArial size=3D2>
> CR> <P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3DEN-US=20
> CR> style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hello,</SPAN></P>
> CR> <P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3DEN-US=20
> CR> style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN>&nbsp;</P>
> CR> <P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3DEN-US=20
> CR> style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN><SPAN lang=3DEN-US=20
> CR> style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">Is there any possibility =
> CR> (or trick)=20
> CR> to dynamically create and destroy atoms during an animation in VMD? For =
> CR> instance=20
> CR> when simulating open systems one would often find himself in such a =
> CR> situation,=20
> CR> i.e. having atoms going in and out of the simulation box continuously. =
> CR> Also, the=20
> CR> bonds in this case should be updated dynamically. Can one set the number =
> CR> of=20
> CR> atoms and the bonds for each frame individually? (When I am talking =
> CR> about=20
> CR> dynamic bonds I am not referring to the drawing method having this name =
> CR> but=20
> CR> rather to a more controllable version in which the user could provide =
> CR> the full=20
> CR> list of bonds per frame.)</SPAN></P>
> CR> <P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3DEN-US=20
> CR> style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN>&nbsp;</P>
> CR> <P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3DEN-US=20
> CR> style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN><SPAN lang=3DEN-US=20
> CR> style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">My input file is a =
> CR> generalized=20
> CR> multi-frame XYZ file having different atom number and species =
> CR> for&nbsp;each=20
> CR> frame.</SPAN></P>
> CR> <P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3DEN-US=20
> CR> style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN>&nbsp;</P>
> CR> <P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3DEN-US=20
> CR> style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN><SPAN lang=3DEN-US=20
> CR> style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">Thank you for your support =
> CR> and=20
> CR> patience,</SPAN></P>
> CR> <P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3DEN-US=20
> CR> style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN><SPAN lang=3DEN-US=20
> CR> style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">Regards,</SPAN></P>
> CR> <P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3DEN-US=20
> CR> style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN><SPAN lang=3DEN-US=20
> CR> style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">Cosmin</SPAN></P>
> CR> <P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN lang=3DEN-US=20
> CR> style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
> CR> Arial"></SPAN></FONT>&nbsp;</P></DIV>
> CR> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
> CR> <DIV><FONT face=3DArial =
> CR> size=3D2>:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:<BR>:=20
> CR> <BR>&nbsp;&nbsp; Cosmin ROMAN, Ph.D.=20
> CR> Student.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
> CR> <BR>:<BR>&nbsp;&nbsp;=20
> CR> TIMA-INPG, MNS Group,<BR>:&nbsp; 46 Avenue F=E9lix =
> CR> Viallet,<BR>&nbsp;&nbsp; 38031=20
> CR> Grenoble Cedex, FRANCE.<BR>:<BR>&nbsp;&nbsp; Tel : 00 33 4 76 57 48=20
> CR> 34<BR>:&nbsp; Fax : 00 33 4 76 47 38 14<BR>&nbsp;&nbsp; e-mail : <A=20
> CR> href=3D"mailto:cosmin.roman_at_imag.fr">cosmin.roman_at_imag.fr</A><BR>:<BR>:*~=
> CR> *:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:</FONT></DIV></BODY></HTML>
>
> CR> ------=_NextPart_000_0B5B_01C432CA.20F2C460--
>
>
>
> --
>
> =======================================================================
> Axel Kohlmeyer e-mail: axel.kohlmeyer_at_theochem.ruhr-uni-bochum.de
> Lehrstuhl fuer Theoretische Chemie Phone: ++49 (0)234/32-26673
> Ruhr-Universitaet Bochum - NC 03/53 Fax: ++49 (0)234/32-14045
> D-44780 Bochum http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/
> =======================================================================
> If you make something idiot-proof, the universe creates a better idiot.

-- 
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