The faster way would be to load the file with the keyword TRAJECTORY. This
allows far faster select and connect processes, because only 370 atoms, not
370x500 will be present at a given time. But then you need that connect
command set in a frame change callback so that it can run every time you get
a new trajectory. I doubt you will notice any delay.
function setConnections
set refreshing false
connect {*} {*} delete
connect @{1.3 + random(1)} (_C) (_C);
connect 1.79 (_Si) (_H);
connect 2.16 (_Si) (_N);
connect 0.90 (_H) (_H);
connect 1.18 (_H) (_N);
connect 1.20 (_N) (_N);
set refreshing true
end function
load TRAJECTORY myfile.xyz
set animFrameCallback "jmolScript:setConnections"
HOWEVER -- that said, I did find a bug in Jmol in relation to this. It turns
out that you can't be making connections in a script while animations are
running. So you may have to wait a bit to implement this if you choose to.
At least try it and see if it isn't much faster.
Bob
On Thu, Mar 26, 2009 at 7:14 AM, Karol Jarolimek
<[email protected]>wrote:
>
> OK I used the connect command and it works like
> a charm. I open the XYZ file and then load the script:
>
> set autobond false;
> connect 2.65 (_Si) (_Si);
> connect 1.79 (_Si) (_H);
> connect 2.16 (_Si) (_N);
> connect 0.90 (_H) (_H);
> connect 1.18 (_H) (_N);
> connect 1.20 (_N) (_N);
>
> I think Jmol loops over all pairs of atoms and over
> all frames. This may take a while. One of my bigger
> systems contains 370 atoms and I have 500 frames ...
> It takes about 10 minutes but it works and I can play
> the animation.
>
> Thank you !
>
>
>
>
> On Sun, 2009-03-22 at 09:56 +0100, [email protected] wrote:
> > Hi,
> >
> > I am trying to view a molecular dynamics simulation, where bonds are
> being
> > formed and destroyed. The data is in the XYZ format containing multiple
> > structures. However I would like to use my own cut-off distances for
> > bonds.
> > Is there a way to do this in Jmol ?
> > Are the bonds being evaluated at each MD step or just at the first one ?
> >
> > I was searching the documentation, but there I found that you can change
> > only Van der Vaals radius but not the covalent.
> >
> > Regards,
> >
> > Karol
> >
> >
> >
> ------------------------------------------------------------------------------
> > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> > easily build your RIAs with Flex Builder, the Eclipse(TM)based
> development
> > software that enables intelligent coding and step-through debugging.
> > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
> > _______________________________________________
> > Jmol-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
--
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107
If nature does not answer first what we want,
it is better to take what answer we get.
-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users