Hi everybody,

I want to select atoms graphically, save these atoms
(something like atom[i].isSelected ? selected[j] = atom[i]) and use them
for further calculations within my code. Primarily I need to know which
of the selected atoms are bonded together (something like
isBonded(atom1, atom2)), the coordinates of the atoms (I know how to do
THIS) and other atoms which are bonded to this selected atoms. I have no
idea how to do this...
I´m using Jmol jmol-10.9.76 and the CdkJmolAdapter. What I did so far is:

I read in a SDF File ,
eval the String "select none;set picking atom;set display selected;";
select some atoms by clicking.
I know I can get the coordinates of the SELECTED atoms like this:
Vector atomInfo = (Vector)viewer.getProperty("object", "atomList",
"selected");
         for(int i = 0; i< atomInfo.size(); i++){
             int x = (Integer) atomInfo.elementAt(i);
             coord = viewer.getAtomPoint3f(x);

         }
I also understood I can get the mol file like this:
viewer.getProperty("string","extractModel","selected");

But how can I get the atoms or ask something like "aBond(atomList[1],
atomList[2])?". And can I save these selected atoms in a "model" so that
I can convert them into a CDK AtomContainer (with atoms and bonds)?

I tried to get the selected BitSet, but getSelectedSet is a private
method, SelectionManager (and getAtomBitSet("selected")) or ModelManager
cannot be accesed outside the package (I had a look how the bonds and
atoms are extracted for "modelExtract"). Is there any other way? Can I
iterate  over atoms and bonds of the molecule in the viewer?

Maybe it´s totally easy, but I don´t have any idea how to do this. Thank
you!

Kind regards,
Tina



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to