[Jmol-users] Jmol 11.1.13 feature PROPOSAL

2007-02-14 Thread Bob Hanson
I have just checked in a version of Jmol that allows:

inverting selected atoms about points and planes

writing of selected coordinates and orientation
reading those files back into Jmol



Basically, there is a new command:

   invertSelection

which by itself inverts all atoms through the center of rotation

   invertSelection POINT [some point description]

which inverts selected atoms through a point

   invertSelection PLANE [some plane description]

which inverts selected atoms across a plane

Now, once this is done, of course, the atoms are not where they used to 
be. That would mess up the state, so I have added a new DATA type called 
"coord":

DATA "coord set"
24 ;
Jmol Coordinate Data Format 1 -- Jmol 11.1.13  2007-02-14 15:54;
1 H H1_#1 2.9400268 2.3187106 -0.35901633 ;
2 N N2_#2 -1.4280989 2.2970076 0.9680812 ;
3 C C3_#3 -0.5195322 0.37288004 -0.24890617 ;
...
24 H H24_#24 0.7507625 -1.5374694 -1.5575587 ;
end "coord set";


which allows setting of atom coordinates in bulk. This is necessary, of 
course, because if you move the atoms, we have to reproduce that in the 
script.

So with that, it seemed simple enough (about 10 lines of code) to create:

  write coords

which writes the same SPT script as

  write state

except it also includes coordinate positions.

SO, having done that, it seemed ridiculous if Jmol could write 
coordinates but not read what it had written, so I added a tiny 
JmolDataReader to read those files.

I really don't know if that is of any particular use. But it was simple 
enough to do.

But more useful, probably, would be the ability to write the coordinates 
in a more standard format, and if people feel strongly that we should 
NOT be able to read these script files this way, I would be happy to 
remove that capability.

Comments? Suggestions for perhaps a SIMPLE general format for writing 
coordinates? XYZ? (no number limitation, but no bonds), MOL? (limited, 
but with bonds), PDB? (unlimited, but rather involved).

Alternatively, should Jmol have a new "native format" that includes the 
"state"?

I don't want to make a big deal about this; just wondering.

And, yes, I know -- the next thing needed is "rotateSelected". I'm 
working on that. When that is in, we can start having quite some fun 
with loading two files, inverting one, moving it above the other, 
rotating it independently, etc. I think there might be some nice 
applications that would use this capability.


Bob



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol 11.1.13 feature PROPOSAL

2007-02-14 Thread Dean Johnston
> I have just checked in a version of Jmol that allows:
> inverting selected atoms about points and planes
  I like it!  I thought about asking to add something like this a while
back, but never got around to submitting an official feature request.  I can
think of some really nice ways of using this capability.  (I'm working on
some pages that illustrate concepts of point-group symmetry - see
http://www.otterbein.edu/home/fac/dnhjhns/xmltest/demo.html )  I still
haven't had time to digest the cool new scripting capabilities...

> And, yes, I know -- the next thing needed is "rotateSelected". I'm
> working on that.
  Any chance you can think about improper rotations as well?  :-)

> Comments? Suggestions for perhaps a SIMPLE general format for writing
> coordinates? XYZ? (no number limitation, but no bonds), MOL? (limited,
> but with bonds), PDB? (unlimited, but rather involved).
> 
> Alternatively, should Jmol have a new "native format" that includes the
> "state"?
  If Jmol is creating it, what you have looks ok (except for connectivity).
I don't know if bonds should be stored like MOL files or as Jmol commands
(like the state).  I like the idea (in principle) of using XML, though it
certainly doesn't fit the "simple" criterion.

Dean


On 2/14/07 7:01 PM, "Bob Hanson" <[EMAIL PROTECTED]> wrote:

> I have just checked in a version of Jmol that allows:
> 
> inverting selected atoms about points and planes
> 
> writing of selected coordinates and orientation
> reading those files back into Jmol
> 
> 
> 
> Basically, there is a new command:
> 
>invertSelection
> 
> which by itself inverts all atoms through the center of rotation
> 
>invertSelection POINT [some point description]
> 
> which inverts selected atoms through a point
> 
>invertSelection PLANE [some plane description]
> 
> which inverts selected atoms across a plane
> 
> Now, once this is done, of course, the atoms are not where they used to
> be. That would mess up the state, so I have added a new DATA type called
> "coord":
> 
> DATA "coord set"
> 24 ;
> Jmol Coordinate Data Format 1 -- Jmol 11.1.13  2007-02-14 15:54;
> 1 H H1_#1 2.9400268 2.3187106 -0.35901633 ;
> 2 N N2_#2 -1.4280989 2.2970076 0.9680812 ;
> 3 C C3_#3 -0.5195322 0.37288004 -0.24890617 ;
> ...
> 24 H H24_#24 0.7507625 -1.5374694 -1.5575587 ;
> end "coord set";
> 
> 
> which allows setting of atom coordinates in bulk. This is necessary, of
> course, because if you move the atoms, we have to reproduce that in the
> script.
> 
> So with that, it seemed simple enough (about 10 lines of code) to create:
> 
>   write coords
> 
> which writes the same SPT script as
> 
>   write state
> 
> except it also includes coordinate positions.
> 
> SO, having done that, it seemed ridiculous if Jmol could write
> coordinates but not read what it had written, so I added a tiny
> JmolDataReader to read those files.
> 
> I really don't know if that is of any particular use. But it was simple
> enough to do.
> 
> But more useful, probably, would be the ability to write the coordinates
> in a more standard format, and if people feel strongly that we should
> NOT be able to read these script files this way, I would be happy to
> remove that capability.
> 
> Comments? Suggestions for perhaps a SIMPLE general format for writing
> coordinates? XYZ? (no number limitation, but no bonds), MOL? (limited,
> but with bonds), PDB? (unlimited, but rather involved).
> 
> Alternatively, should Jmol have a new "native format" that includes the
> "state"?
> 
> I don't want to make a big deal about this; just wondering.
> 
> And, yes, I know -- the next thing needed is "rotateSelected". I'm
> working on that. When that is in, we can start having quite some fun
> with loading two files, inverting one, moving it above the other,
> rotating it independently, etc. I think there might be some nice
> applications that would use this capability.
> 
> 
> Bob
> 
> 
> 
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol 11.1.13 feature PROPOSAL

2007-02-14 Thread Bob Hanson
this now works. Aren't matrices great! I cannot believe how easy this 
is. The new command is

rotateSelected 

and then just like "rotate" or "spin"

Because I'm loathe to create still another command, I've added "spin" as 
a keyword to "rotate" so now you can say, for example:

select file=1; rotateSelected spin internal 10 (C5/1) (C6/1)

or, in context:

load "files" "cholesterol.mol" "cholesterol.mol"
file 0;display *; show all models, all atoms
select file=1; invertselected  # now I have two enantiomers
translateselected {0 5 5} # offset one
center visible
rotateselected x 180;rotateselected y 180
rotateSelected spin internal x 10
set picking select molecule

And, sure enough, only the top cholesterol spins. If you use the mouse, 
both models rotate with the mouse -- unless you hold ALT down while 
rotating, then only the spinning model rotates with you! And, if you 
select the other model while this is happening, guess what? IT starts 
spinning instead. Or, select all, and, yes, all start spinning. TOO much 
fun!

Oh, and then do

set navigationmode
set navigationspeed 50

and use the arrow keys to enter the SPINNING molecule and look around.  
Oh, oh. Oh, I think I'm going to get sick. I do NOT recommend doing 
this. Seriously. I think some people might have to leave the room if you 
do this for a crowd. Yeiks.

Bob


> That's a slippery slope to molecule manipulation and other molecular 
> editing tasks. ;-)

Not interested.

>
> Jmol should be able to load two models and rotate one so it can be 
> compared (visually) with another but I don't think it needs to *make* 
> the other model.
>
done


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol 11.1.13 feature PROPOSAL

2007-02-14 Thread Bob Hanson
Dean Johnston wrote:

>>I have just checked in a version of Jmol that allows:
>>inverting selected atoms about points and planes
>>
>>
>  I like it!  I thought about asking to add something like this a while
>back, but never got around to submitting an official feature request.  I can
>think of some really nice ways of using this capability.  (I'm working on
>some pages that illustrate concepts of point-group symmetry - see
>http://www.otterbein.edu/home/fac/dnhjhns/xmltest/demo.html )  I still
>haven't had time to digest the cool new scripting capabilities...
>
>  
>
great -- you can use the Miller indices and select symmetry operation sets:

select symop=1555
invertselected HKL {1/2 1/2 0}

oooh.

>>And, yes, I know -- the next thing needed is "rotateSelected". I'm
>>working on that.
>>
>>
done - that works, too.

>  Any chance you can think about improper rotations as well?  :-)
>
>  
>
Let's see.. What's an improper rotation again? Oh, sure, that's trivial --

angle = 60
rotate internal @angle {} {};
select *;invertSelected POINT {...};

Right?

>>Comments? Suggestions for perhaps a SIMPLE general format for writing
>>coordinates? XYZ? (no number limitation, but no bonds), MOL? (limited,
>>but with bonds), PDB? (unlimited, but rather involved).
>>
>>Alternatively, should Jmol have a new "native format" that includes the
>>"state"?
>>
>>
>  If Jmol is creating it, what you have looks ok (except for connectivity).
>I don't know if bonds should be stored like MOL files or as Jmol commands
>(like the state).  I like the idea (in principle) of using XML, though it
>certainly doesn't fit the "simple" criterion.
>
>  
>
It's really not important. If you

  write coord state.spt

and then

  load state.spt

the nice thing is that it's all one file now. But you are pretty much 
just back to what you get in an XYZ file.
But if you instead have that original file still in place and

  script state.spt

then it loads the original file and moves the atoms to where they need 
to be.


Bob


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol 11.1.13 feature PROPOSAL

2007-02-15 Thread Frieda Reichsman

Hi Bob,

Trying out the new commands on
http://www.stolaf.edu/academics/chemapps/jmol/docs/examples-11/new.htm

and I am getting errors such as

script compiler ERROR: command expected

   file 0 

and

script ERROR: java.io.FileNotFoundException: http://www.stolaf.edu/ 
academics/chemapps/jmol/docs/examples-11/data/cholesterol.mol


 load >> "cholesterol.mol" <<

Frieda




On Feb 14, 2007, at 7:01 PM, Bob Hanson wrote:


I have just checked in a version of Jmol that allows:

inverting selected atoms about points and planes

writing of selected coordinates and orientation
reading those files back into Jmol



Basically, there is a new command:

   invertSelection

which by itself inverts all atoms through the center of rotation

   invertSelection POINT [some point description]

which inverts selected atoms through a point

   invertSelection PLANE [some plane description]

which inverts selected atoms across a plane

Now, once this is done, of course, the atoms are not where they  
used to
be. That would mess up the state, so I have added a new DATA type  
called

"coord":

DATA "coord set"
24 ;
Jmol Coordinate Data Format 1 -- Jmol 11.1.13  2007-02-14 15:54;
1 H H1_#1 2.9400268 2.3187106 -0.35901633 ;
2 N N2_#2 -1.4280989 2.2970076 0.9680812 ;
3 C C3_#3 -0.5195322 0.37288004 -0.24890617 ;
...
24 H H24_#24 0.7507625 -1.5374694 -1.5575587 ;
end "coord set";


which allows setting of atom coordinates in bulk. This is  
necessary, of
course, because if you move the atoms, we have to reproduce that in  
the

script.

So with that, it seemed simple enough (about 10 lines of code) to  
create:


  write coords

which writes the same SPT script as

  write state

except it also includes coordinate positions.

SO, having done that, it seemed ridiculous if Jmol could write
coordinates but not read what it had written, so I added a tiny
JmolDataReader to read those files.

I really don't know if that is of any particular use. But it was  
simple

enough to do.

But more useful, probably, would be the ability to write the  
coordinates

in a more standard format, and if people feel strongly that we should
NOT be able to read these script files this way, I would be happy to
remove that capability.

Comments? Suggestions for perhaps a SIMPLE general format for writing
coordinates? XYZ? (no number limitation, but no bonds), MOL? (limited,
but with bonds), PDB? (unlimited, but rather involved).

Alternatively, should Jmol have a new "native format" that includes  
the

"state"?

I don't want to make a big deal about this; just wondering.

And, yes, I know -- the next thing needed is "rotateSelected". I'm
working on that. When that is in, we can start having quite some fun
with loading two files, inverting one, moving it above the other,
rotating it independently, etc. I think there might be some nice
applications that would use this capability.


Bob



-- 
---

Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to  
share your

opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php? 
page=join.php&p=sourceforge&CID=DEVDEV

___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


///

Frieda Reichsman, PhD
Molecules in Motion
Interactive Molecular Structures
http://www.moleculesinmotion.com

///


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol 11.1.13 feature PROPOSAL

2007-02-15 Thread Bob Hanson
Sorry -- I think I forgot to upload the latest changes. Please try again.

Bob

Frieda Reichsman wrote:

> Hi Bob,
>
> Trying out the new commands on 
> http://www.stolaf.edu/academics/chemapps/jmol/docs/examples-11/new.htm
>
> and I am getting errors such as
>
> script compiler ERROR: command expected
> 
>    file 0 
>
> and
>
> script ERROR: java.io.FileNotFoundException: 
> http://www.stolaf.edu/academics/chemapps/jmol/docs/examples-11/data/cholesterol.mol
> 
>  load >> "cholesterol.mol" <<
>
> Frieda
>
>
>
>
> On Feb 14, 2007, at 7:01 PM, Bob Hanson wrote:
>
>> I have just checked in a version of Jmol that allows:
>>
>> inverting selected atoms about points and planes
>>
>> writing of selected coordinates and orientation
>> reading those files back into Jmol
>>
>>
>>
>> Basically, there is a new command:
>>
>>invertSelection
>>
>> which by itself inverts all atoms through the center of rotation
>>
>>invertSelection POINT [some point description]
>>
>> which inverts selected atoms through a point
>>
>>invertSelection PLANE [some plane description]
>>
>> which inverts selected atoms across a plane
>>
>> Now, once this is done, of course, the atoms are not where they used to 
>> be. That would mess up the state, so I have added a new DATA type called 
>> "coord":
>>
>> DATA "coord set"
>> 24 ;
>> Jmol Coordinate Data Format 1 -- Jmol 11.1.13  2007-02-14 15:54;
>> 1 H H1_#1 2.9400268 2.3187106 -0.35901633 ;
>> 2 N N2_#2 -1.4280989 2.2970076 0.9680812 ;
>> 3 C C3_#3 -0.5195322 0.37288004 -0.24890617 ;
>> ...
>> 24 H H24_#24 0.7507625 -1.5374694 -1.5575587 ;
>> end "coord set";
>>
>>
>> which allows setting of atom coordinates in bulk. This is necessary, of 
>> course, because if you move the atoms, we have to reproduce that in the 
>> script.
>>
>> So with that, it seemed simple enough (about 10 lines of code) to create:
>>
>>   write coords
>>
>> which writes the same SPT script as
>>
>>   write state
>>
>> except it also includes coordinate positions.
>>
>> SO, having done that, it seemed ridiculous if Jmol could write 
>> coordinates but not read what it had written, so I added a tiny 
>> JmolDataReader to read those files.
>>
>> I really don't know if that is of any particular use. But it was simple 
>> enough to do.
>>
>> But more useful, probably, would be the ability to write the coordinates 
>> in a more standard format, and if people feel strongly that we should 
>> NOT be able to read these script files this way, I would be happy to 
>> remove that capability.
>>
>> Comments? Suggestions for perhaps a SIMPLE general format for writing 
>> coordinates? XYZ? (no number limitation, but no bonds), MOL? (limited, 
>> but with bonds), PDB? (unlimited, but rather involved).
>>
>> Alternatively, should Jmol have a new "native format" that includes the 
>> "state"?
>>
>> I don't want to make a big deal about this; just wondering.
>>
>> And, yes, I know -- the next thing needed is "rotateSelected". I'm 
>> working on that. When that is in, we can start having quite some fun 
>> with loading two files, inverting one, moving it above the other, 
>> rotating it independently, etc. I think there might be some nice 
>> applications that would use this capability.
>>
>>
>> Bob
>>
>>
>>
>> -
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to 
>> share your
>> opinions on IT & business topics through brief surveys-and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV 
>> 
>> ___
>> Jmol-users mailing list
>> Jmol-users@lists.sourceforge.net 
>> 
>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
> ///
>
>
> Frieda Reichsman, PhD
>
> Molecules in Motion
>
> Interactive Molecular Structures
>
> http://www.moleculesinmotion.com
>
>
> ///
>
>
>
>
>
>-
>Take Surveys. Earn Cash. Influence the Future of IT
>Join SourceForge.net's Techsay panel and you'll get the chance to share your
>opinions on IT & business topics through brief surveys-and earn cash
>http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
>
>
>___
>Jmol-users mailing list
>Jmol-users@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/jmol-users
>  
>


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.