Bob,

Your changes seem to address my problems nicely. I do have some timing
issues, within Jmol Scrip and JavaScript. I need top work on these. Here is
the JavaScript that I'm using for atom replacement following your
modifications on the applet:

        evalRasmol("{atomIndex=" + atomIndex + "}.element = '" + buildAtom +
"';");

        evalRasmol("set useMinimizationThread false;echo working...;delete
hydrogens;minimize addHydrogens;wireframe 0.15; spacefill 23%;boundbox
{*};centerat boundbox;minimize steps 100;");

        setTimeout("doUFF()",2000)

The above modification of my code is pretty much the result of trial and
error. I'm not sure I understand why, but the code must be just so. I cannot
simply do a longer minimize in the second evalRasmol function. Further, even
though the minimize is the last command, the "set useMinimizationThread
false" is required. Finally, I must call another "minimize" and it cannot
follow the first minimize in the Jmol code string even with a delay. I must
call it with a JavaScript timeout. The evalRasmol  function is not anything
sophisticated. It's basically a call to "appObj.script(scpt)" where appObj
is the Jmol applet and scpt is the script string.

Nevertheless, it works with your applet modifications. Some specific points:

1) Formaldehyde to imine via N substitution for O still produces the strange
H insertion, but the above code corrects this.
2) The "delete hydrogens;minimize addHydrogens" sequence works fine with
terminal alkenes.
3) I have a point and click single, double, and triple bond insertion
routine now, and you can build ketene with this from methane. There are,
indeed, superimposed hydrogens. If, however, I build ketene from a starting
ethene, then all is OK. The geometry following minimize is pushing in the
right direction, but it never quite gets there. C=C=C is a bit bent, but the
hydrogens are moving to the correct out of plane geometry.

None of this is on the chemagic server yet. I'm going to work on timing
problems, and put it up later today, hopefully with a more intuitive
interface. I also need to look into "delete hydrogens" at the site of change
only. I have a feeling this will improve performance. I think the atom
expression for these hydrogens should be easy to construct from the
atomIndex numbers that are part of the substitution.

Otis


On Mon, Feb 15, 2010 at 8:33 AM, Robert Hanson <[email protected]> wrote:

> Otis, give this next one a try.
>
> http://chemapps.stolaf.edu/jmol/docs/examples-11/Jmol-11.zip
>
> Basically, the atom deletion business was never fully worked out. This is
> great help to have you testing it. I didn't check imines, just ethylene and
> terminal alkenes. Most likely does not work with cumulenes.
>
> Bob
>
>
>
> On Sun, Feb 14, 2010 at 2:56 PM, Otis Rothenberger <[email protected]>wrote:
>
>> Bob,
>>
>> I think I have the latest version of 11.9.30_dev on the chemagic server:
>>
>> http://chemagic.com/web_molecules/script_page_large.aspx
>>
>> User instructions are sparse right now, but I think you can reconstruct
>> some of my specific issues with the following brief instructions:
>>
>> Use the "Model Building and Other Tools" link to bring up the menu.
>> Basically, users can pick a base start molecule (CH4, H2CCH2, HCCH, and
>> H2CO) and select a click/replace atom for model click/replace. The basic
>> JavaScript code for click replace is:
>>
>>
>>         evalRasmol("{atomIndex=" + atomIndex + "}.element = '" + buildAtom
>> + "';");
>>         evalRasmol("minimize addHydrogens;wireframe 0.15; spacefill
>> 23%;boundbox {*};centerat boundbox;");
>>
>> For testing purposes, I've put the Rectify Hydrogen as a separate link.
>> The JavaScript code here is:
>>
>>       evalRasmol("select *;delete hydrogens;minimize addHydrogens;");
>>
>> Some problem examples (Note I have not yet tried to localize delete
>> hydrogens):
>>
>> 1) Load H2CCH2 and click Rectify - pointless, but it illustrates the
>> terminal alkene issue.
>>
>> 2) Load H2CO and replace O with N - this is an example of the N-H issue on
>> an imine.
>>
>> 3) Load CH4 and replace an H with a C. The result is ethane. Replace an
>> ethane H with a Cl. Do this with another ethane H. Now click Rectify.
>> Subsequent Cl replacement add with what appears to be a C-H bond length.
>>
>> 4) Load H2CCH2 and replace one of the carbons with O. Click Rectify. This
>> is another example of problem 1 (above), but it illustrates a problem with
>> what I would like to do. Specifically, make rectify an automatic part of any
>> change.
>>
>> A note on point 4: Loading methane, building this to propane, and changing
>> this to dimethy ether woks very nicely with rectify automatically hooked in.
>> It has the visual feel of working with a model kit. In addition, building
>> using a single bond framework seems to work just fine in general. You must,
>> of course, be careful not to run new atoms into bonding distance of existing
>> atoms.
>>
>> 5) Load methane. Replace a hydrogen with nitrogen. Do not click Rectify!
>> Either click my UFF link on the page or type minimize in the text window
>> (Run link to execute).
>>
>> If you repeat 5 above, but click Rectify before minimize, then the
>> minimize will no longer separate the coincident H's on N. This appears to be
>> a general problem: minimize will not work after a rectify. The problem here
>> is that an automatic rectify after each substitution is, from my point of
>> view, desirable.
>>
>> I hope my lack of specific instructions on the Web page is not a problem
>> for you. Let me know if you need more information. If ftp access to our
>> server would be of use to you, I'd be happy to send the information via a
>> direct note.
>>
>> Finally, you are correct delete by atomIndex does work. I'm not sure why I
>> had a problem with this.
>>
>>
>> Otis
>>
>> --
>> Otis Rothenberger
>> http://chemagic.org
>>
>>
>> ------------------------------------------------------------------------------
>> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
>> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
>> http://p.sf.net/sfu/solaris-dev2dev
>> _______________________________________________
>> 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
>
>
> ------------------------------------------------------------------------------
> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris-dev2dev
>
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>


-- 
Otis Rothenberger
http://chemagic.org
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to