Right. I fixed that, too, I think. No?

This:

  {
     var mod1 = "C2H4O2 ...";
    load
  }
  "@mod1";


should be this:

  {
     var mod1 = "C2H4O2\nAPtclcactv09271012363D 0 ...."
     load "@mod1"; 
  }

Try the latest I uploaded.

Bob

On Mon, Sep 27, 2010 at 11:56 AM, Otis Rothenberger <osrothen@chemagic.com> wrote:
 Bob,

I may have complicated the issue with the example of duplicating a
model. The problem seems to exist in any single model (no append) using
load from string. Appended to this email is the state code for a model
of acetic acid loaded with a string using data returned from NIH
Resolver. I can save the state, but attempts to restore state lead to
"cannot find string data."

Otis

# Jmol state version 12.1.14_dev  2010-09-17 15:12;
  # fullName = "jmolApplet0__699979344321214__";
  # documentBase =
"http://localhost:8080/web_molecules/script_page_large.aspx";
  # codeBase = "http://localhost:8080/code/jmol/";


function _setWindowState() {
# height 460;
# width 450;
  stateVersion = 1201014;
  background [x000000];
  axis1Color = "[xff0000]";
  axis2Color = "[x008000]";
  axis3Color = "[x0000ff]";
  set ambientPercent 45;
  set diffusePercent 84;
  set specular true;
  set specularPercent 22;
  set specularPower 40;
  set specularExponent 6;
  set zShadePower 1;
  statusReporting  = true;
}

function _setFileState() {

  set allowEmbeddedScripts false;
  set appendNew true;
  set appletProxy "";
  set applySymmetryToBonds false;
  set autoBond true;
  set bondRadiusMilliAngstroms 150;
  set bondTolerance 0.45;
  set defaultLattice {0.0 0.0 0.0};
  set defaultLoadFilter "";
  set defaultLoadScript "";
  set defaultVDW Auto;
  set forceAutoBond false;
  #set defaultDirectory "";
  #set loadFormat "http://www.rcsb.org/pdb/files/%FILE.pdb.gz";
  #set smilesUrlFormat
"http://cactus.nci.nih.gov/chemical/structure/%FILE/file?format=sdf&get3d=True";
  #set edsUrlFormat
"http://eds.bmc.uu.se/eds/dfs/%LC13/%LCFILE/%LCFILE.omap";
  #set edsUrlCutoff
"load('http://eds.bmc.uu.se/eds/dfs/%LC13/%LCFILE/%LCFILE.sfdat').lines.find('MAP_SIGMA').split('
')[2]";
  set minBondDistance 0.4;
  set minimizationCriterion  0.0010;
  set minimizationSteps  100;
  set pdbGetHeader false;
  set pdbSequential false;
  set percentVdwAtom 23;
  set smallMoleculeMaxAtoms 40000;
  set smartAromatic true;
  {
var mod1 = "C2H4O2\nAPtclcactv09271012363D 0   0.00000     0.00000\n \n
8  7  0  0  0  0  0  0  0  0999 V2000\n    1.4183    0.4213   -0.0000
C   0  0  0  0  0  0  0  0  0  0  0  0\n   -0.2518   -1.2408   -0.0000
O   0  0  0  0  0  0  0  0  0  0  0  0\n   -1.0161    0.8327   -0.0000
O   0  0  0  0  0  0  0  0  0  0  0  0\n   -0.0108   -0.0568   -0.0000
C   0  0  0  0  0  0  0  0  0  0  0  0\n   -1.9331    0.5259    0.0000
H   0  0  0  0  0  0  0  0  0  0  0  0\n    1.7629    0.5365    1.0277
H   0  0  0  0  0  0  0  0  0  0  0  0\n    2.0452   -0.3075   -0.5138
H   0  0  0  0  0  0  0  0  0  0  0  0\n    1.4806    1.3805   -0.5138
H   0  0  0  0  0  0  0  0  0  0  0  0\n  3  4  1  0  0  0  0\n  2  4
2  0  0  0  0\n  1  4  1  0  0  0  0\n  3  5  1  0  0  0  0\n  1  6  1
0  0  0  0\n  1  7  1  0  0  0  0\n  1  8  1  0  0  0  0\nM  END\n$$$$\n\n";
  load
}
 "@mod1";

}

function _setVariableState() {

   set defaultanglelabel "%VALUE %UNITS";
   set defaultcolorscheme "Jmol";
   set defaultdistancelabel "%VALUE %UNITS";
   set defaultdrawarrowscale 0.5;
   set defaultlattice "{0 0 0}";
   set defaultloadfilter "";
   set defaultloadscript "";
   set defaulttorsionlabel "%VALUE %UNITS";
   set defaulttranslucent 0.5;
   set defaultvdw "Auto";
  set allowembeddedscripts true;
  set allowrotateselected false;
  set appletproxy "";
  set applysymmetrytobonds false;
  set atompicking true;
  set atomtypes "";
  set autobond true;
  set autofps false;
  set axes window;
  set axesmode 0;
  set axesscale 2.0;
  set bondmodeor false;
  set bondradiusmilliangstroms 150;
  set bondtolerance 0.45;
  set cartoonbaseedges false;
  set cartoonrockets false;
  set chaincasesensitive false;
  set dataseparator "~~~";
  set delaymaximumms 0;
  set dipolescale 1.0;
  set disablepopupmenu false;
  set displaycellparameters true;
  set dotdensity 3;
  set dotscale 1;
  set dotsselectedonly false;
  set dotsurface true;
  set dragselected false;
  set drawhover false;
  set drawpicking false;
  set dynamicmeasurements false;
  set ellipsoidarcs false;
  set ellipsoidaxes false;
  set ellipsoidaxisdiameter 0.02;
  set ellipsoidball true;
  set ellipsoiddotcount 200;
  set ellipsoiddots false;
  set ellipsoidfill false;
  set forceautobond false;
  set fractionalrelative false;
  set gestureswipefactor 1.0;
  set greyscalerendering false;
  set hbondsangleminimum 90.0;
  set hbondsbackbone false;
  set hbondsdistancemaximum 3.25;
  set hbondsrasmol true;
  set hbondssolid false;
  set helixstep 1;
  set helppath "http://chemapps.stolaf.edu/jmol/docs/index.htm";
  set hermitelevel 0;
  set hidenameinpopup false;
  set hidenavigationpoint false;
  set highresolution false;
  set historylevel 0;
  set hoverdelay 0.5;
  set imagestate true;
  set iskiosk false;
  set isosurfacepropertysmoothing true;
  set isosurfacepropertysmoothingpower 7;
  set justifymeasurements false;
  set loadatomdatatolerance 0.01;
  set logcommands false;
  set logfile "";
  set loggestures false;
  set measureallmodels false;
  set measurementlabels true;
  set messagestylechime false;
  set minbonddistance 0.4;
  set minimizationcriterion 0.0010;
  set minimizationrefresh true;
  set minimizationsilent false;
  set minimizationsteps 100;
  set monitorenergy false;
  set multiplebondradiusfactor 0.0;
  set multiplebondspacing -1.0;
  set navigatesurface false;
  set navigationperiodic false;
  set navigationspeed 5.0;
  set pdbgetheader false;
  set pdbsequential false;
  set percentvdwatom 23;
  set pickingspinrate 10;
  set picklabel "";
  set pointgroupdistancetolerance 0.2;
  set pointgrouplineartolerance 8.0;
  set propertyatomnumbercolumncount 0;
  set propertyatomnumberfield 0;
  set propertycolorscheme "roygb";
  set propertydatacolumncount 0;
  set propertydatafield 0;
  set quaternionframe "p";
  set rangeselected false;
  set ribbonaspectratio 16;
  set ribbonborder false;
  set rocketbarrels false;
  set saveproteinstructurestate true;
  set selectallmodels true;
  set selecthetero true;
  set selecthydrogen true;
  set sheetsmoothing 1.0;
  set showhiddenselectionhalos false;
  set showhydrogens true;
  set showkeystrokes true;
  set showmeasurements true;
  set showmultiplebonds true;
  set shownavigationpointalways false;
  set slabbyatom false;
  set slabbymolecule false;
  set smallmoleculemaxatoms 40000;
  set smartaromatic true;
  set solventprobe false;
  set solventproberadius 1.2;
  set ssbondsbackbone false;
  set stereodegrees -5;
  set strandcountformeshribbon 7;
  set strandcountforstrands 5;
  set strutdefaultradius 0.3;
  set strutlengthmaximum 7.0;
  set strutsmultiple false;
  set strutspacing 6;
  set testflag1 false;
  set testflag2 false;
  set testflag3 false;
  set testflag4 false;
  set tracealpha true;
  set usearcball false;
  set useminimizationthread true;
  set usenumberlocalization true;
  set vectorscale 1.0;
  set vibrationscale 1.0;
  set wireframerotation false;
  set zdepth 0;
  set zoomlarge true;
  set zslab 0;

#user-defined variables;
  mod1 = "C2H4O2\nAPtclcactv09271012363D 0   0.00000     0.00000\n \n
8  7  0  0  0  0  0  0  0  0999 V2000\n    1.4183    0.4213   -0.0000
C   0  0  0  0  0  0  0  0  0  0  0  0\n   -0.2518   -1.2408   -0.0000
O   0  0  0  0  0  0  0  0  0  0  0  0\n   -1.0161    0.8327   -0.0000
O   0  0  0  0  0  0  0  0  0  0  0  0\n   -0.0108   -0.0568   -0.0000
C   0  0  0  0  0  0  0  0  0  0  0  0\n   -1.9331    0.5259    0.0000
H   0  0  0  0  0  0  0  0  0  0  0  0\n    1.7629    0.5365    1.0277
H   0  0  0  0  0  0  0  0  0  0  0  0\n    2.0452   -0.3075   -0.5138
H   0  0  0  0  0  0  0  0  0  0  0  0\n    1.4806    1.3805   -0.5138
H   0  0  0  0  0  0  0  0  0  0  0  0\n  3  4  1  0  0  0  0\n  2  4
2  0  0  0  0\n  1  4  1  0  0  0  0\n  3  5  1  0  0  0  0\n  1  6  1
0  0  0  0\n  1  7  1  0  0  0  0\n  1  8  1  0  0  0  0\nM  END\n$$$$\n\n";

# label defaults;
  select none;
  color label none;
  background label none;
  set labelOffset 4 4;
  set labelAlignment left;
  set labelPointer off;
  font label 13.0 SansSerif Plain;

}

function _setModelState() {

  select ({0 3});
  Spacefill 0.391;
  select ({1 2});
  Spacefill 0.3495;
  select ({4:7});
  Spacefill 0.253;
  select BONDS ({0:6});
  wireframe 0.15;

  measures delete;
  select *; set measures nanometers;
  font measures 15.0 SansSerif Plain;

  set echo off;

  boundBox off;
  font boundBox 14.0 SansSerif Plain;
  boundBox off;

  hover "";

  frank on;
  font frank 16.0 SansSerif Bold;
  set fontScaling false;

}

function _setPerspectiveState() {
  set perspectiveModel 11;
  set scaleAngstromsPerInch 0.0;
  set perspectiveDepth true;
  set visualRange 5.0;
  set cameraDepth 3.0;
  boundbox ({0:7});
  center {0.056050003 0.06984997 0.25694996};
  moveto -1.0 {0 0 1 0} 100.0 0.0 0.0 {0.056050003 0.06984997
0.25694996} 3.380128 {0.0 0.0 0.0} 0.0 0.0 0.0;
  save orientation "default"
  moveto 0.0 {0 0 1 0} 100.0 0.0 0.0 {0.056050003 0.06984997
0.25694996} 3.380128 {0.0 0.0 0.0} -0.8347846 1.0177015 0.0;;
  slab 100;depth 0;
  set slabRange 0.0;
  set spinX 0; set spinY 30; set spinZ 0; set spinFps 30;  set navX 0;
set navY 0; set navZ 0; set navFps 10;
}

function _setSelectionState() {
  select ({0:7});
  set hideNotSelected false;
}

function _setState() {
  initialize;
  set refreshing false;
  _setWindowState;
  _setFileState;
  _setVariableState;
  _setModelState;
  _setPerspectiveState;
  _setSelectionState;
  set refreshing true;
  set antialiasDisplay false;
  set antialiasTranslucent true;
  set antialiasImages true;
}

_setState;


Otis Rothenberger
chemagic.com






------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
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