I don't think that is the issue. But this is very inefficient:
for (var i = 1; i < {*}.length +1; i++){ {*}[i].atomno = i }
What you want there is:
var n = {*}.length; for (var i = 1; i <= n; i++){ {*}[i].atomno = i }
Still that should not be it. Aren't you getting some sort of error messages?
I would use
set debugscript
first, then run that and see what it gives.
Bob
On Wed, Jul 9, 2014 at 10:58 PM, Otis Rothenberger <[email protected]>
wrote:
> Bob,
>
> I use the following script to duplicate a model in the Jmol window:
>
> scpt = 'center;var mod2 = "' + Jmol.getPropertyAsString(jmolApplet0,
> "extractModel") + '";';
> scpt += 'set echo top left;echo;set appendNew false;var z=' + bbMax() +
> ';';
> scpt += 'select *;translateSelected {@z @z 0};load APPEND "@mod2";';
> scpt += 'hover "";select *;wireframe 0.15;spacefill 23%;boundbox
> {*};centerat boundbox;minimize CLEAR;';
> scpt += 'for (var i = 1; i < {*}.length +1; i++){ {*}[i].atomno = i }';
> Jmol.script(jmolApplet0, scpt);
>
> bbMax() simply calculates the longest dimension of the bound box. This all
> works, BUT the resulting model pair has a Jmol state problem. I can write a
> state, but it will not restore. Is my atomno renumbering screwing this up?
>
> The renumbering may seem strange, but I'm working with edited models, and
> the renumbering prevents atomno overlap produced by duplicating edited
> models.
>
> This is not a huge problem. I'm just curious if the renumbering is the
> guilty party.
>
> Otis
>
> --
> Otis Rothenberger
> [email protected]
>
>
> ------------------------------------------------------------------------------
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Department of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr
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