Christoph,
Generally, you will interact with Jmol using
viewer.script(String script)
That is really the best way, because the requests are queued. Alternatively
you can use
viewer.scriptWait(String script)
which will return a structure that contains information about the script
that ran, including all output.
And, yes, there are direct API methods you can use, but probably not for
this sort of thing. Jmol does not expose the model to extensive method
calling because it can be way more complicated than one might think
initially.
Generally if you are doing a rotation/translation you have two options: just
change the view, or actually change the coordinates. I'm guessing that you
are thinking about superimposing two proteins. In that case, If you already
have a rotation/translation, fine, but Jmol will also calculate the
quaternion closed-form best superposition if you want to do that. Check out
the documentation on the COMPARE command, if you are interested in that.
Using viewer.script may seem too "high level" to you, but I would encourage
you to look into that. It's quite efficient, and extremely flexible.
Bob
On Tue, Nov 2, 2010 at 2:28 PM, Dr. Christoph Gille <
christoph.gi...@charite.de> wrote:
> No real solution for my question yet - so I try to explain the
> problem again in other words: Two or more pdb files are loaded with "load
> append"
>
> I want to rotate/translate one protein using a 3x3 matrix and
> translation-Vector. I am looking for the appropriate way to do
> this.
>
> I do not completely understand yet, how the proteins and their Atoms
> are organized in Jmol. Somehow there are models, each having a
> number. I do not understand, how these models are accessed using the API.
>
>
> I found a class org.pdbj.viewer.molecules.Atom
> which has getters and setters for the 3D-coordinates.
>
> That could be sufficient if I knew, how to get the Atom
> objects for the protein under consideration. I could then transform
> each of the atoms using these setX, setY and setZ -methods.
>
> Or perhaps there is already an utility method in Jmol, to
> perform affine transformations for entire molecules?
>
>
> Cheers
>
> Christoph
>
>
>
>
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America
> contest
> Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in
> marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> Jmol-developers mailing list
> Jmol-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-developers
>
--
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
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers