Re: [Jmol-users] jmol and overlay data

2007-06-13 Thread Raphael A. Bauer
Angel Herraez wrote:
 Tell me what you think of this:
 http://biomodel.uah.es/angel/RaphaelBauer/mapping.htm
1. wow.. thanks for that quick answer in html form!
2. wow.. simply yet elegant solution to my problem!
3. arg.. i should have thought about that earlier myself..!

combining points 1.-3. thanks for your help... that's great...
and that's pretty mich what I wanted...

raphael


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] jmol and overlay data

2007-06-13 Thread Bob Hanson
Raphael, this is an intriguing question. Keep talking about what sort of 
mapping you might imagine. What characteristics are important to you?

- the mapping is visible for all atoms at once?
or
- the mapping is visible for an atom if the mouse is picked?

for instance.

Let me demonstrate with some Jmol script code. The following Jmol script 
gets you the mapped atom number:


#maps i -- j, where i:j is in the map
strList = [ MAP ] 1:16 2:15 3:10 4:14 5:9 6:11 7:13 8:12
thisAtom = 3  #for instance
mappedAtom = 0+strList[strList.find( +3+:)][0].split( )[2].split(:)[2]
show mappedAtom #will be the number 10

and this script highlights it when the first atom is picked:

#--

strList = [ MAP ] 1:16 2:15 3:10 4:14 5:9 6:11 7:13 8:12
thisAtom = 1 + _atomPicked
mappedAtom = 0+strList[strList.find( +thisAtom+:)][0].split( 
)[2].split(:)[2]
select atomno=mappedAtom
selectionHalo on
if (mappedAtom = 0)
msg = Atom  + thisAtom +  is not mapped
else
msg = Atom  + thisAtom +  is mapped to atom  + mappedAtom
endif
set echo top left
echo @msg

#--

Note that _atomPicked is the overall index of the atom, starting with 0 and 
running through all models. So you might have to play a few tricks to turn it 
into an atom number. For example:

  thisAtomNumber = {atomIndex=_atompicked}.atomno


So if you saved that in showMappedAtom.spt and then used:

  set pickCallback script:showMappdedAtom.spt

then as the user picks atoms, the message changes and the mapped atom is 
highlighed with a pretty halo.
For your application, you would need to consider what model the atom is in and 
perhaps allow for two-way mapping. To get any atom's file and model number, you 
would use:

  thisFile = {*}[thisatom].file
  thisModel = {*}[thisatom].model

thisModel will be 1 for your case, but the file number should indicate 1 or 
2 and fit into a select command then as:

  otherFile = 3 - thisFile

select atomno=mappedAtom and file=otherFile

Something like that


If you want to display both models side-by-side instead of on top of each 
other, you might consider doing something like:

load files model1.sdf model2.sdf
frame 0
select 2.1
translateSelected {5 0 0}
zoomTo 0.0 (*) 80




Bob Hanson


Raphael A. Bauer wrote:

Angel Herraez wrote:
  

Can you think of anything inside jmol that helps me to visualize this
abstract superposition mapping?
  

On a first thought, there may be many wasy to indicate that: csame 
color, lines between matching atoms, etc.

The key point is 
how and where is your assignment (superposition) indicated?

Please, provide details and an example file



okay I attached three sources.

[1] source file ind sdf format
[2] target file in sdf format
and a mapping.

the mapping looks like:
[ MAP ] 1:16 2:15 3:10 4:14 5:9 6:11 7:13 8:12

where 1:16 means atom one from file [1] corresponds to atom  16 in file
[2] and so on.

okay to be clear - I do not expect JMol to do more than it is intended
for - but maybe there is a functionality built-in Jmol that can help us
here to visualize that. maybe a jmol script...

many thanks in advance...

raphael




[1]
1
SItclserve07250621173D 0   0.0 0.01

 15 15  0  0  0  0  0  0  0  0999 V2000
1.88901.7851   -0.0009 C   0  0  0  0  0  0  0  0  0  0  0  0
0.77300.7724   -0.0022 C   0  0  0  0  0  0  0  0  0  0  0  0
1.0858   -0.67120. C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.50311.18160.0003 C   0  0  0  0  0  0  0  0  0  0  0  0
2.2422   -1.04200.0024 O   0  0  0  0  0  0  0  0  0  0  0  0
   -0.0081   -1.6639   -0.0002 C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.59690.1889   -0.0004 C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.2842   -1.2547   -0.0029 C   0  0  0  0  0  0  0  0  0  0  0  0
   -2.75340.55970.0023 O   0  0  0  0  0  0  0  0  0  0  0  0
1.46752.7903   -0.0028 H   0  0  0  0  0  0  0  0  0  0  0  0
2.50151.64970.8905 H   0  0  0  0  0  0  0  0  0  0  0  0
2.50521.6479   -0.8894 H   0  0  0  0  0  0  0  0  0  0  0  0
   -0.73172.23710.0033 H   0  0  0  0  0  0  0  0  0  0  0  0
0.2206   -2.71940.0013 H   0  0  0  0  0  0  0  0  0  0  0  0
   -2.0840   -1.9805   -0.0034 H   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  1  0  0  0  0
  2  3  1  0  0  0  0
  2  4  2  0  0  0  0
  3  5  2  0  0  0  0
  3  6  1  0  0  0  0
  4  7  1  0  0  0  0
  6  8  2  0  0  0  0
  7  9  2  0  0  0  0
  7  8  1  0  0  0  0
  1 10  1  0  0  0  0
  1 11  1  0  0  0  0
  1 12  1  0  0  0  0
  4 13  1  0  0  0  0
  6 14  1  0  0  0  0
  8 15  1  0  0  0  0
M  END







[2]
2
SItclserve07250621173D 0   0.0 0.01

 28 31  0  0  0  0  0  0  0  0999 V2000
0.0.0. C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.08000.3600   -1.3600 C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.2000   -0.0800   -2.0800 C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.40000.3000   -3.7000 S   0  0  0  0  0  0  0  

Re: [Jmol-users] jmol and overlay data

2007-06-12 Thread Raphael A. Bauer
Angel Herraez wrote:
 Can you think of anything inside jmol that helps me to visualize this
 abstract superposition mapping?
 
 On a first thought, there may be many wasy to indicate that: csame 
 color, lines between matching atoms, etc.
 
 The key point is 
 how and where is your assignment (superposition) indicated?
 
 Please, provide details and an example file

okay I attached three sources.

[1] source file ind sdf format
[2] target file in sdf format
and a mapping.

the mapping looks like:
[ MAP ] 1:16 2:15 3:10 4:14 5:9 6:11 7:13 8:12

where 1:16 means atom one from file [1] corresponds to atom  16 in file
[2] and so on.

okay to be clear - I do not expect JMol to do more than it is intended
for - but maybe there is a functionality built-in Jmol that can help us
here to visualize that. maybe a jmol script...

many thanks in advance...

raphael




[1]
1
SItclserve07250621173D 0   0.0 0.01

 15 15  0  0  0  0  0  0  0  0999 V2000
1.88901.7851   -0.0009 C   0  0  0  0  0  0  0  0  0  0  0  0
0.77300.7724   -0.0022 C   0  0  0  0  0  0  0  0  0  0  0  0
1.0858   -0.67120. C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.50311.18160.0003 C   0  0  0  0  0  0  0  0  0  0  0  0
2.2422   -1.04200.0024 O   0  0  0  0  0  0  0  0  0  0  0  0
   -0.0081   -1.6639   -0.0002 C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.59690.1889   -0.0004 C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.2842   -1.2547   -0.0029 C   0  0  0  0  0  0  0  0  0  0  0  0
   -2.75340.55970.0023 O   0  0  0  0  0  0  0  0  0  0  0  0
1.46752.7903   -0.0028 H   0  0  0  0  0  0  0  0  0  0  0  0
2.50151.64970.8905 H   0  0  0  0  0  0  0  0  0  0  0  0
2.50521.6479   -0.8894 H   0  0  0  0  0  0  0  0  0  0  0  0
   -0.73172.23710.0033 H   0  0  0  0  0  0  0  0  0  0  0  0
0.2206   -2.71940.0013 H   0  0  0  0  0  0  0  0  0  0  0  0
   -2.0840   -1.9805   -0.0034 H   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  1  0  0  0  0
  2  3  1  0  0  0  0
  2  4  2  0  0  0  0
  3  5  2  0  0  0  0
  3  6  1  0  0  0  0
  4  7  1  0  0  0  0
  6  8  2  0  0  0  0
  7  9  2  0  0  0  0
  7  8  1  0  0  0  0
  1 10  1  0  0  0  0
  1 11  1  0  0  0  0
  1 12  1  0  0  0  0
  4 13  1  0  0  0  0
  6 14  1  0  0  0  0
  8 15  1  0  0  0  0
M  END







[2]
2
SItclserve07250621173D 0   0.0 0.01

 28 31  0  0  0  0  0  0  0  0999 V2000
0.0.0. C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.08000.3600   -1.3600 C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.2000   -0.0800   -2.0800 C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.40000.3000   -3.7000 S   0  0  0  0  0  0  0  0  0  0  0  0
   -2.8800   -0.5600   -3.6600 C   0  0  0  0  0  0  0  0  0  0  0  0
   -4.1400   -0.9600   -4.7000 S   0  0  0  0  0  0  0  0  0  0  0  0
   -5.4400   -2.0400   -3.5200 S   0  0  0  0  0  0  0  0  0  0  0  0
   -6.7000   -2.4400   -4.5600 C   0  0  0  0  0  0  0  0  0  0  0  0
   -7.6400   -3.1800   -3.8400 N   0  0  0  0  0  0  0  0  0  0  0  0
   -8.7200   -3.5600   -4.6000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -9.8400   -4.3000   -4.2200 C   0  0  0  0  0  0  0  0  0  0  0  0
  -10.8000   -4.5600   -5.2200 C   0  0  0  0  0  0  0  0  0  0  0  0
  -10.6400   -4.0800   -6.5400 C   0  0  0  0  0  0  0  0  0  0  0  0
   -9.4800   -3.3400   -6.8800 C   0  0  0  0  0  0  0  0  0  0  0  0
   -8.5200   -3.0800   -5.8800 C   0  0  0  0  0  0  0  0  0  0  0  0
   -7.1400   -2.2200   -6.2200 S   0  0  0  0  0  0  0  0  0  0  0  0
   -3.1600   -1.0800   -2.4000 N   0  0  0  0  0  0  0  0  0  0  0  0
   -2.2000   -0.8000   -1.4600 C   0  0  0  0  0  0  0  0  0  0  0  0
   -2.1400   -1.1800   -0.1000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.0200   -0.76000.6200 C   0  0  0  0  0  0  0  0  0  0  0  0
0.84840.30730.5750 H   0  0  0  0  0  0  0  0  0  0  0  0
0.68440.9465   -1.8254 H   0  0  0  0  0  0  0  0  0  0  0  0
   -9.9647   -4.6534   -3.2178 H   0  0  0  0  0  0  0  0  0  0  0  0
  -11.6691   -5.1336   -4.9740 H   0  0  0  0  0  0  0  0  0  0  0  0
  -11.3901   -4.2742   -7.2780 H   0  0  0  0  0  0  0  0  0  0  0  0
   -9.3350   -2.9845   -7.8787 H   0  0  0  0  0  0  0  0  0  0  0  0
   -2.9147   -1.76090.3553 H   0  0  0  0  0  0  0  0  0  0  0  0
   -0.9317   -1.01641.6551 H   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  2  0  0  0  0
  2  3  1  0  0  0  0
  3  4  1  0  0  0  0
  4  5  1  0  0  0  0
  5  6  1  0  0  0  0
  6  7  1  0  0  0  0
  7  8  1  0  0  0  0
  8  9  2  0  0  0  0
  9 10  1  0  0  0  0
 10 11  2  0  0  0  0
 11 12  1  0  0  0  0
 12 13  2  0  0  0  0
 13 14  1  0  0  0  0
 14 15  2  0  0  0  0
 10 15  1  0  0  0  0
 15 16  1  0  0  0  0
  8 16  1  0  0  0  0
  5 17  2  0  0  0  0
 17 18  1  0  0  0  0
  3 18  2  0  0  0  0
 18 19  1  0  0  0  0
 19 20  2  0  0  0  0
  1 20  1  0  0  0  0
  1 21  1  0  0  0  0
  2 22  1  0  0  0  0
 11 23  1  0  0  0  0
 12 24  1  0  

Re: [Jmol-users] jmol and overlay data

2007-06-12 Thread Angel Herraez
Hi Raphael

Tell me what you think of this:
http://biomodel.uah.es/angel/RaphaelBauer/mapping.htm



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] jmol and overlay data

2007-06-11 Thread Raphael A. Bauer
Hi jmol users,

I got the following visualization problem: 2 mol files: file A and file B.

Plus i have an assignment (superposition) of atoms in file A that
correspond to atoms in file B.

Can you think of anything inside jmol that helps me to visualize this
abstract superposition mapping?

Many thanks in advance!

raphael

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users