Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #85861 > unrolled thread

Re: can python handle CHIME .spt files?

Started byLaura Creighton <lac@openend.se>
First post2015-02-19 05:57 +0100
Last post2015-02-19 05:57 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: can python handle CHIME .spt files? Laura Creighton <lac@openend.se> - 2015-02-19 05:57 +0100

#85861 — Re: can python handle CHIME .spt files?

FromLaura Creighton <lac@openend.se>
Date2015-02-19 05:57 +0100
SubjectRe: can python handle CHIME .spt files?
Message-ID<mailman.18858.1424321880.18130.python-list@python.org>
I went and asked your question to Andrew Dalke, who is an expert
in such things.  Writing programs for visualising molecules is what
he does for a living.  The news is not good.

First of all, he says the "spt" format is a command format.
See http://www.callutheran.edu/BioDev/omm/scripting_ch/molmast.htm
for examples.

  select all; wireframe;
    dots off; wireframe off; backbone;
      wireframe 100; spacefill off; list molsurface transparent;
        select all; spacefill; set specular on; set specpower 20;
	  define piece :A and 10, :A and 11, :A and 12;
	    select all; spacefill off; wireframe;
	      select atomno=4174; label protein;

It's like Tcl, with lots of internal syntax handled by the individual commands.

For example, "select atomno=4174" takes a full expression, like

  select atomno >= 195 and atomno <= 277

More details at http://jmol.sourceforge.net/docs/JmolUserGuide/ch04.html .

The only way to tell that it works, in Python and without using Chime, is
to re-write command interpreter that understands the script syntax.   Andrew
Dalke says that he tried something like that back in the 1990s, and
while it's possible, it is not easy.  When Andrew says things like that,
you can bet money that it is very, very hard, because he does seemingly
impossible things for fun over breakfast.  Indeed, I wrote him hoping he
would have scripts lying around that already do this ...

He says that, these days, the best solution would probably be some
in-browser Javascript code that drives Chime and checks if there's an error,
but this is also not a job for somebody who is learning how to program,
and iff it's less than several dozen/100 scripts, then really this is best
done manually, unless the person  enjoys programming.

If you want to write him and ask him more questions, his contact page
is at http://www.dalkescientific.com/contact.html  He's very friendly,
as well as being a very good friend of mine.

Laura Creighton

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web