On Mon, Nov 1, 2010 at 12:22 PM, Dr. Christoph Gille <
christoph.gi...@charite.de> wrote:

> I am updating  to current Jmol12 in Strap to take advantage of the new
> feature of displaying more than one model at a time in JMol.
>
>
OK, well, I don't know that I would refer to that as "new" -- what version
were you using? :)


>
> I am stuck with two problems.  Could you please help:
>
> With Jmol10, the method Viewer#getAtomIndexFromAtomNumber(int atomNumber)
> was used in STRAP.
> At this time there was only one protein loaded.
>
> But what if there are more than one proteins.
> How is the model number specified?
> For example I would like to know the atom index of atom 1000 in PDB file 1
> and then I am interested in
> atom 1000 of PDB file 2;
>
> That method still works provided you have only one model visible at a time.


Will you have two models visible at a time?


The models are referenced in scripts as file.model -- so, 1.1 is the first
model in the first file, 1.2 is the second model in the first file, 3.5 is
the fifth model in the third file, 3.0 is all models in the third file, etc.
So that's the safest way to reference multiple models, at least in scripts.
You can also use "file=" in a script, but you do run the risk there of a
multimodel file.

You could try:

String strNum = viewer.scriptWait("print {atomno=100 and 1.1}.atomIndex")

and then parse that for an integer. The string "NaN" will be returned if
there is no atomno=100.

I could also add getAtomBitSet to the API so you could use:

BitSet bsAtoms = viewer.getAtomBitSet("atomno=100 and 1.1")

which would be roughly equivalent.

Bob



> ----
>
> My second questions concerns coordinate transformations.
> Imagine I have a rotation matrix and translation
> vector. They are used to compute the new coordinates x',y',z' for model 1:
>
>  X' = X *   0.93 +  Y *   0.33 +  Z *  -0.07 +   54.32
>  Y' = Y *   0.05 +  Y *   0.09 +  Z *   0.99 +   41.95
>  Z' = Z *   0.34 +  Y *  -0.93 +  Z *   0.07 +   74.71
>
> The transformation should start from the original atom coordinates as
> recorded in the PDB and not relatively
> from the current state.  (As opposed to the command "rotate " which rotates
> relatively from the current
> state.) That means that applying the same transformation a second time
> should have no additional effect.
>
> The other protein (Model 2) should not move it should stay in place. Only
> model 1 should be transformed.
>
> How can I use the jmol-API (or scripting language) to perform such
> coordinate transformation.
>
>
> Many thanks
>
> 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

Reply via email to