From: SourceForge.net <no...@so...> - 2007-06-17 12:59:48
|
Feature Requests item #1664357, was opened at 2007-02-20 08:24 Message generated for change (Comment added) made by hansonr You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=379136&aid=1664357&group_id=23629 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Interface Improvements Group: None >Status: Closed Priority: 9 Private: No Submitted By: Bob Hanson (hansonr) Assigned to: Bob Hanson (hansonr) Summary: Jmol variable math Initial Comment: With the addition of multi-type variable manipulation in Jmol 11.1.14 we move into a new stage with Jmol, in which much of what previously was only available in the applet and only available using some pretty hefty JavaScript is now trivially possible. Basically we can now look at Jmol as a visualization database processor. Load a model, and then start asking questions. How many oxygens are there? x = {oxygen} What is the degree of unsaturation? x = (2.0 * {carbon} + 2 + {nitrogen} - {hydrogen})/2 What is the distance from the center of molecule 1 to the center of molecule 2? x = ({molecule=1}.xyz).distance({molecule=2}.xyz) And we can do data extractions amazingly simply: xyzData = "" + {selected} + "\n\n" + {selected}.label("%a %x %y %z") pdbAtomData = {selected and not hetero}.label("ATOM %5i %-4a%1A%3n %1c%4R%1E %8.3x%8.3y%8.3z%6.2q%6.2b %2e%2C") pdbHeteroData = {selected and hetero}.label("HETATM%5i %-4a%1A%3n %1c%4R%1E %8.3x%8.3y%8.3z%6.2q%6.2b %2e%2C") pdbFile = pdbAtomData + pdbHeteroData OK, so with this message I suggest we discuss additional possibilities. The framework is there; the main questions are: 1) Do I have the functionality right? 2) What additional functionality would be useful? I can suggest a few additions: simple string commands: x = "some string".find("xxx") x = "some string"[1][10] x = "some string".lines x = "some string".lines[3] x = "some string".lines[1][10] x = "".load("some file name") write {....} filename (application only) Bob ---------------------------------------------------------------------- >Comment By: Bob Hanson (hansonr) Date: 2007-06-17 07:59 Message: Logged In: YES user_id=1082841 Originator: YES all are part of 11.2 ---------------------------------------------------------------------- Comment By: Bob Hanson (hansonr) Date: 2007-02-20 12:42 Message: Logged In: YES user_id=1082841 Originator: YES I went ahead and added write VAR varName "fileName" for example: xyzData = "" + {selected} + "\n\n" + {selected}.label("%a %x %y %z") write VAR xyzData "myfile.xyz" ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=379136&aid=1664357&group_id=23629 |