Bob-

I apologize for the incomplete information. The timing problems that I'm
having may actually be Jmol bugs, so I'll document an important case below.

1) I load ethane.
2) I run following Jmol script:

{atomIndex=3}.element = "C";minimize addHydrogens;select hydrogen and
connected({atomIndex=3});delete selected

The script only executes "{atomIndex=3}.element = "C";minimize
addHydrogens;"

If, however, I run the script in two separate steps (I'm using an execute
script text field on my page.), the two sequential steps do what I expected:

Step 1: select hydrogen and connected({atomIndex=3});delete selected;
Step 2: {atomIndex=3}.element = "C";minimize addHydrogens;

As expected, these two steps run separately add a carbon, add hydrogens, and
then delete these hydrogens. I've been calling my encounter with this type
of problem a "timing problem," but timing may not be the problem.

Of course, in this case, there is no need for the delete, but in general,
the steps 1 and 2 are needed - e.g. "{atomIndex=1}.element = "O";minimize
addHydrogens" requires a delete followed by an add.

I checked atomInfo after each step above, and, indeed, the new carbon atom
is atomIndex=3. Just in case I missed something in the atomInfo, I'll paste
the atom info for original ethane and after step 1 below:

Otis

Initial Ethane:

atomInfo    *Vector[8]
atomInfo[1].element    "carbon"
atomInfo[1].visible    true
atomInfo[1].model    "1"
atomInfo[1].radius    0.80833334
atomInfo[1].visibilityFlags    13
atomInfo[1].clickabilityFlags    12
atomInfo[1].bondCount    4
atomInfo[1].atomno    1
atomInfo[1].elemno    6
atomInfo[1].z    0.0
atomInfo[1].y    0.0
atomInfo[1].x    -0.7615
atomInfo[1].partialCharge    -0.067999996
atomInfo[1].sym    "C"
atomInfo[1].colix    -32762
atomInfo[1].spacefill    0.391
atomInfo[1].coord    {-0.7615 0.0 0.0}
atomInfo[1].color    "[x909090]"
atomInfo[1].info    "[SUBUNIT]1:A.C1 #1"
atomInfo[1].atomIndex    0
atomInfo[1]._ipt    0
atomInfo[1].formalCharge    0
atomInfo[2].element    "carbon"
atomInfo[2].visible    true
atomInfo[2].model    "1"
atomInfo[2].radius    0.80833334
atomInfo[2].visibilityFlags    13
atomInfo[2].clickabilityFlags    12
atomInfo[2].bondCount    4
atomInfo[2].atomno    2
atomInfo[2].elemno    6
atomInfo[2].z    0.0
atomInfo[2].y    0.0
atomInfo[2].x    0.7615
atomInfo[2].partialCharge    -0.067999996
atomInfo[2].sym    "C"
atomInfo[2].colix    -32762
atomInfo[2].spacefill    0.391
atomInfo[2].coord    {0.7615 0.0 0.0}
atomInfo[2].color    "[x909090]"
atomInfo[2].info    "[SUBUNIT]1:A.C2 #2"
atomInfo[2].atomIndex    1
atomInfo[2]._ipt    1
atomInfo[2].formalCharge    0
atomInfo[3].element    "hydrogen"
atomInfo[3].visible    true
atomInfo[3].model    "1"
atomInfo[3].radius    0.525
atomInfo[3].visibilityFlags    13
atomInfo[3].clickabilityFlags    12
atomInfo[3].bondCount    1
atomInfo[3].atomno    3
atomInfo[3].elemno    1
atomInfo[3].z    0.0
atomInfo[3].y    1.0459
atomInfo[3].x    -1.1422
atomInfo[3].partialCharge    0.0227
atomInfo[3].sym    "H"
atomInfo[3].colix    -32767
atomInfo[3].spacefill    0.253
atomInfo[3].coord    {-1.1422 1.0459 0.0}
atomInfo[3].color    "[xffffff]"
atomInfo[3].info    "[SUBUNIT]1:A.H3 #3"
atomInfo[3].atomIndex    2
atomInfo[3]._ipt    2
atomInfo[3].formalCharge    0
atomInfo[4].element    "hydrogen"
atomInfo[4].visible    true
atomInfo[4].model    "1"
atomInfo[4].radius    0.525
atomInfo[4].visibilityFlags    13
atomInfo[4].clickabilityFlags    12
atomInfo[4].bondCount    1
atomInfo[4].atomno    4
atomInfo[4].elemno    1
atomInfo[4].z    0.90500003
atomInfo[4].y    -0.52419996
atomInfo[4].x    -1.1422
atomInfo[4].partialCharge    0.0227
atomInfo[4].sym    "H"
atomInfo[4].colix    -32767
atomInfo[4].spacefill    0.253
atomInfo[4].coord    {-1.1422 -0.52419996 0.90500003}
atomInfo[4].color    "[xffffff]"
atomInfo[4].info    "[SUBUNIT]1:A.H4 #4"
atomInfo[4].atomIndex    3
atomInfo[4]._ipt    3
atomInfo[4].formalCharge    0
atomInfo[5].element    "hydrogen"
atomInfo[5].visible    true
atomInfo[5].model    "1"
atomInfo[5].radius    0.525
atomInfo[5].visibilityFlags    13
atomInfo[5].clickabilityFlags    12
atomInfo[5].bondCount    1
atomInfo[5].atomno    5
atomInfo[5].elemno    1
atomInfo[5].z    -0.90500003
atomInfo[5].y    -0.52419996
atomInfo[5].x    -1.1422
atomInfo[5].partialCharge    0.0227
atomInfo[5].sym    "H"
atomInfo[5].colix    -32767
atomInfo[5].spacefill    0.253
atomInfo[5].coord    {-1.1422 -0.52419996 -0.90500003}
atomInfo[5].color    "[xffffff]"
atomInfo[5].info    "[SUBUNIT]1:A.H5 #5"
atomInfo[5].atomIndex    4
atomInfo[5]._ipt    4
atomInfo[5].formalCharge    0
atomInfo[6].element    "hydrogen"
atomInfo[6].visible    true
atomInfo[6].model    "1"
atomInfo[6].radius    0.525
atomInfo[6].visibilityFlags    13
atomInfo[6].clickabilityFlags    12
atomInfo[6].bondCount    1
atomInfo[6].atomno    6
atomInfo[6].elemno    1
atomInfo[6].z    0.0
atomInfo[6].y    -1.0459
atomInfo[6].x    1.1422
atomInfo[6].partialCharge    0.0227
atomInfo[6].sym    "H"
atomInfo[6].colix    -32767
atomInfo[6].spacefill    0.253
atomInfo[6].coord    {1.1422 -1.0459 0.0}
atomInfo[6].color    "[xffffff]"
atomInfo[6].info    "[SUBUNIT]1:A.H6 #6"
atomInfo[6].atomIndex    5
atomInfo[6]._ipt    5
atomInfo[6].formalCharge    0
atomInfo[7].element    "hydrogen"
atomInfo[7].visible    true
atomInfo[7].model    "1"
atomInfo[7].radius    0.525
atomInfo[7].visibilityFlags    13
atomInfo[7].clickabilityFlags    12
atomInfo[7].bondCount    1
atomInfo[7].atomno    7
atomInfo[7].elemno    1
atomInfo[7].z    0.90500003
atomInfo[7].y    0.52419996
atomInfo[7].x    1.1422
atomInfo[7].partialCharge    0.0227
atomInfo[7].sym    "H"
atomInfo[7].colix    -32767
atomInfo[7].spacefill    0.253
atomInfo[7].coord    {1.1422 0.52419996 0.90500003}
atomInfo[7].color    "[xffffff]"
atomInfo[7].info    "[SUBUNIT]1:A.H7 #7"
atomInfo[7].atomIndex    6
atomInfo[7]._ipt    6
atomInfo[7].formalCharge    0
atomInfo[8].element    "hydrogen"
atomInfo[8].visible    true
atomInfo[8].model    "1"
atomInfo[8].radius    0.525
atomInfo[8].visibilityFlags    13
atomInfo[8].clickabilityFlags    12
atomInfo[8].bondCount    1
atomInfo[8].atomno    8
atomInfo[8].elemno    1
atomInfo[8].z    -0.90500003
atomInfo[8].y    0.52419996
atomInfo[8].x    1.1422
atomInfo[8].partialCharge    0.0227
atomInfo[8].sym    "H"
atomInfo[8].colix    -32767
atomInfo[8].spacefill    0.253
atomInfo[8].coord    {1.1422 0.52419996 -0.90500003}
atomInfo[8].color    "[xffffff]"
atomInfo[8].info    "[SUBUNIT]1:A.H8 #8"
atomInfo[8].atomIndex    7
atomInfo[8]._ipt    7
atomInfo[8].formalCharge    0


After Step 1:

atomInfo    *Vector[11]
atomInfo[1].element    "carbon"
atomInfo[1].visible    true
atomInfo[1].model    "1"
atomInfo[1].radius    0.80833334
atomInfo[1].visibilityFlags    13
atomInfo[1].clickabilityFlags    12
atomInfo[1].bondCount    4
atomInfo[1].atomno    1
atomInfo[1].elemno    6
atomInfo[1].z    -0.07662228
atomInfo[1].y    0.044318
atomInfo[1].x    -0.7284024
atomInfo[1].partialCharge    -0.067999996
atomInfo[1].sym    "C"
atomInfo[1].colix    -32762
atomInfo[1].spacefill    0.391
atomInfo[1].coord    {-0.7284024 0.044318 -0.07662228}
atomInfo[1].color    "[x909090]"
atomInfo[1].info    "[SUBUNIT]1:A.C1 #1"
atomInfo[1].atomIndex    0
atomInfo[1]._ipt    0
atomInfo[1].formalCharge    0
atomInfo[2].element    "carbon"
atomInfo[2].visible    true
atomInfo[2].model    "1"
atomInfo[2].radius    0.80833334
atomInfo[2].visibilityFlags    13
atomInfo[2].clickabilityFlags    12
atomInfo[2].bondCount    4
atomInfo[2].atomno    2
atomInfo[2].elemno    6
atomInfo[2].z    -1.9062017E-4
atomInfo[2].y    0.006451379
atomInfo[2].x    0.6672193
atomInfo[2].partialCharge    -0.067999996
atomInfo[2].sym    "C"
atomInfo[2].colix    -32762
atomInfo[2].spacefill    0.391
atomInfo[2].coord    {0.6672193 0.006451379 -1.9062017E-4}
atomInfo[2].color    "[x909090]"
atomInfo[2].info    "[SUBUNIT]1:A.C2 #2"
atomInfo[2].atomIndex    1
atomInfo[2]._ipt    1
atomInfo[2].formalCharge    0
atomInfo[3].element    "hydrogen"
atomInfo[3].visible    true
atomInfo[3].model    "1"
atomInfo[3].radius    0.525
atomInfo[3].visibilityFlags    13
atomInfo[3].clickabilityFlags    12
atomInfo[3].bondCount    1
atomInfo[3].atomno    3
atomInfo[3].elemno    1
atomInfo[3].z    -1.5137201E-5
atomInfo[3].y    0.9515201
atomInfo[3].x    -1.1374098
atomInfo[3].partialCharge    0.0227
atomInfo[3].sym    "H"
atomInfo[3].colix    -32767
atomInfo[3].spacefill    0.253
atomInfo[3].coord    {-1.1374098 0.9515201 -1.5137201E-5}
atomInfo[3].color    "[xffffff]"
atomInfo[3].info    "[SUBUNIT]1:A.H3 #3"
atomInfo[3].atomIndex    2
atomInfo[3]._ipt    2
atomInfo[3].formalCharge    0
atomInfo[4].element    "carbon"
atomInfo[4].visible    true
atomInfo[4].model    "1"
atomInfo[4].radius    0.525
atomInfo[4].visibilityFlags    13
atomInfo[4].clickabilityFlags    12
atomInfo[4].bondCount    4
atomInfo[4].atomno    4
atomInfo[4].elemno    6
atomInfo[4].z    0.98063457
atomInfo[4].y    -0.56796104
atomInfo[4].x    -1.1781847
atomInfo[4].partialCharge    0.0227
atomInfo[4].sym    "C"
atomInfo[4].colix    -32762
atomInfo[4].spacefill    0.253
atomInfo[4].coord    {-1.1781847 -0.56796104 0.98063457}
atomInfo[4].color    "[x909090]"
atomInfo[4].info    "[SUBUNIT]1:A.H4 #4"
atomInfo[4].atomIndex    3
atomInfo[4]._ipt    3
atomInfo[4].formalCharge    0
atomInfo[5].element    "hydrogen"
atomInfo[5].visible    true
atomInfo[5].model    "1"
atomInfo[5].radius    0.525
atomInfo[5].visibilityFlags    13
atomInfo[5].clickabilityFlags    12
atomInfo[5].bondCount    1
atomInfo[5].atomno    5
atomInfo[5].elemno    1
atomInfo[5].z    -0.8264246
atomInfo[5].y    -0.47213003
atomInfo[5].x    -1.1354815
atomInfo[5].partialCharge    0.0227
atomInfo[5].sym    "H"
atomInfo[5].colix    -32767
atomInfo[5].spacefill    0.253
atomInfo[5].coord    {-1.1354815 -0.47213003 -0.8264246}
atomInfo[5].color    "[xffffff]"
atomInfo[5].info    "[SUBUNIT]1:A.H5 #5"
atomInfo[5].atomIndex    4
atomInfo[5]._ipt    4
atomInfo[5].formalCharge    0
atomInfo[6].element    "hydrogen"
atomInfo[6].visible    true
atomInfo[6].model    "1"
atomInfo[6].radius    0.525
atomInfo[6].visibilityFlags    13
atomInfo[6].clickabilityFlags    12
atomInfo[6].bondCount    1
atomInfo[6].atomno    6
atomInfo[6].elemno    1
atomInfo[6].z    -0.035207964
atomInfo[6].y    -1.041018
atomInfo[6].x    1.2297618
atomInfo[6].partialCharge    0.0227
atomInfo[6].sym    "H"
atomInfo[6].colix    -32767
atomInfo[6].spacefill    0.253
atomInfo[6].coord    {1.2297618 -1.041018 -0.035207964}
atomInfo[6].color    "[xffffff]"
atomInfo[6].info    "[SUBUNIT]1:A.H6 #6"
atomInfo[6].atomIndex    5
atomInfo[6]._ipt    5
atomInfo[6].formalCharge    0
atomInfo[7].element    "hydrogen"
atomInfo[7].visible    true
atomInfo[7].model    "1"
atomInfo[7].radius    0.525
atomInfo[7].visibilityFlags    13
atomInfo[7].clickabilityFlags    12
atomInfo[7].bondCount    1
atomInfo[7].atomno    7
atomInfo[7].elemno    1
atomInfo[7].z    0.8839429
atomInfo[7].y    0.5514767
atomInfo[7].x    1.2301948
atomInfo[7].partialCharge    0.0227
atomInfo[7].sym    "H"
atomInfo[7].colix    -32767
atomInfo[7].spacefill    0.253
atomInfo[7].coord    {1.2301948 0.5514767 0.8839429}
atomInfo[7].color    "[xffffff]"
atomInfo[7].info    "[SUBUNIT]1:A.H7 #7"
atomInfo[7].atomIndex    6
atomInfo[7]._ipt    6
atomInfo[7].formalCharge    0
atomInfo[8].element    "hydrogen"
atomInfo[8].visible    true
atomInfo[8].model    "1"
atomInfo[8].radius    0.525
atomInfo[8].visibilityFlags    13
atomInfo[8].clickabilityFlags    12
atomInfo[8].bondCount    1
atomInfo[8].atomno    8
atomInfo[8].elemno    1
atomInfo[8].z    -0.8266734
atomInfo[8].y    0.47145042
atomInfo[8].x    1.1457973
atomInfo[8].partialCharge    0.0227
atomInfo[8].sym    "H"
atomInfo[8].colix    -32767
atomInfo[8].spacefill    0.253
atomInfo[8].coord    {1.1457973 0.47145042 -0.8266734}
atomInfo[8].color    "[xffffff]"
atomInfo[8].info    "[SUBUNIT]1:A.H8 #8"
atomInfo[8].atomIndex    7
atomInfo[8]._ipt    7
atomInfo[8].formalCharge    0
atomInfo[9].element    "hydrogen"
atomInfo[9].visible    true
atomInfo[9].model    "1"
atomInfo[9].radius    0.525
atomInfo[9].visibilityFlags    13
atomInfo[9].clickabilityFlags    12
atomInfo[9].bondCount    1
atomInfo[9].atomno    9
atomInfo[9].elemno    1
atomInfo[9].z    1.0680546
atomInfo[9].y    -1.4436048
atomInfo[9].x    -0.5607295
atomInfo[9].partialCharge    0.0
atomInfo[9].sym    "H"
atomInfo[9].colix    -32767
atomInfo[9].spacefill    0.253
atomInfo[9].coord    {-0.5607295 -1.4436048 1.0680546}
atomInfo[9].color    "[xffffff]"
atomInfo[9].info    "H9 #9"
atomInfo[9].atomIndex    8
atomInfo[9]._ipt    8
atomInfo[9].formalCharge    0
atomInfo[10].element    "hydrogen"
atomInfo[10].visible    true
atomInfo[10].model    "1"
atomInfo[10].radius    0.525
atomInfo[10].visibilityFlags    13
atomInfo[10].clickabilityFlags    12
atomInfo[10].bondCount    1
atomInfo[10].atomno    10
atomInfo[10].elemno    1
atomInfo[10].z    1.7802764
atomInfo[10].y    0.13419197
atomInfo[10].x    -1.0401628
atomInfo[10].partialCharge    0.0
atomInfo[10].sym    "H"
atomInfo[10].colix    -32767
atomInfo[10].spacefill    0.253
atomInfo[10].coord    {-1.0401628 0.13419197 1.7802764}
atomInfo[10].color    "[xffffff]"
atomInfo[10].info    "H10 #10"
atomInfo[10].atomIndex    9
atomInfo[10]._ipt    9
atomInfo[10].formalCharge    0
atomInfo[11].element    "hydrogen"
atomInfo[11].visible    true
atomInfo[11].model    "1"
atomInfo[11].radius    0.525
atomInfo[11].visibilityFlags    13
atomInfo[11].clickabilityFlags    12
atomInfo[11].bondCount    1
atomInfo[11].atomno    11
atomInfo[11].elemno    1
atomInfo[11].z    0.7612281
atomInfo[11].y    -0.781339
atomInfo[11].x    -2.2020159
atomInfo[11].partialCharge    0.0
atomInfo[11].sym    "H"
atomInfo[11].colix    -32767
atomInfo[11].spacefill    0.253
atomInfo[11].coord    {-2.2020159 -0.781339 0.7612281}
atomInfo[11].color    "[xffffff]"
atomInfo[11].info    "H11 #11"
atomInfo[11].atomIndex    10
atomInfo[11]._ipt    10
atomInfo[11].formalCharge    0



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