Re: [PyMOL] Secondary structure assignments
I've got a crude interface to the RasMol code which lets you run RasMol's secondary structure assignment code from PyMOL at: http://www.rahul.net/pcm/rasmolapi.tar.gz I don't make any promises as to how well it works or whether I will ever get around to cleaning up the ugly code. If there are any other RasMol routines that would be valuable to PyMOL, it probably wouldn't take much more additional work to make them available. -- -- Peter McCluskey | Free Jon Johansen! http://www.rahul.net/pcm |
Re: [PyMOL] Secondary structure assignments
On Mon, Jul 29, 2002 at 01:12:40PM -0400, Nathaniel Echols wrote: How hard would it be to incorporate the DSSP algorithm? I was looking at the source for RasMol, which has a complete implementation. My feeling is that this could be ported without too much misery. However, RasMol's license terms are different, and I suspect even a complete translation into Python with the ChemPy API would still be considered a derivative work, meaning it wouldn't be able to be part of the main distribution, and meaning someone would still have to code DSSP from scratch. (I have utterly no idea how it works, but RasMol's code seems clear enough despite lack of comments) I am not a lawyer, just a scientist who happens to be interested in these sorts of 'intellectual property' problems, so weigh the following accordingly: Copyright and the idea of derivative works applies to very specific expressions of an idea. So, unless the DSSP algorithym is patented, a complete re-expression in a language like Python (instead of C or C++ or whatever RasMol is written in) could probably be made different enough so as to be an original work, distinct from RasMol's implementation. This is what the the Gnu project did with Unix command-line utilities for example--rewrote them, added features, and so forth. The best way to avoid derivative work concern is to code in a clean room fashion, without reference to someone else's code. In principle, this could be done working from the original paper(s) that describe an algorithm. Not that I'm volunteering ;-) Just that I would hate to see someone who was willing and interested in implementing secondary structure code for PyMol to be frightened off the job if, indeed, it could be done in a way that respects others' rights. --Joe
Re: [PyMOL] Secondary structure assignments
Le Sun, 28 July 2002, Nathaniel Echols a écrit snip but I'm working on making it more general. I suppose since I only use this for loading files into PyMOL, I could just write it in Python as a PyMOL module. . . would that be useful to anyone else? Yes, please. There are some structures that have to be generated by using symmetry operations defined in the REMARK 350 lines in the pdb file (example: 1jjy.pdb). The only way (I know of, if you know a better one, please tell me) to do this is going to http://pqs.ebi.ac.uk where the complete structure is generated for you. However, the caveat is: This service removes the secondary structure information, and up to now I have manually copy-pasted it into the new pdb file (Annoying work, really). However, PyMOL's built-in commands end up being much easier to use... I wish I'd realized that before I wrote my parser. Hehe, will have to learn them,... joerg Internet et mail gratuit AltaVista http://www.altavista.fr
Re: [PyMOL] Secondary structure assignments
Le Sun, 28 July 2002, Nathaniel Echols a écrit snip but I'm working on making it more general. I suppose since I only use this for loading files into PyMOL, I could just write it in Python as a PyMOL module. . . would that be useful to anyone else? Yes, please. There are some structures that have to be generated by using symmetry operations defined in the REMARK 350 lines in the pdb file (example: ijjy.pdb). The only way (I know of, if you know a better one, please tell me) to do this is going to http://pqs.ebi.ac.uk where the complete structure is generated for you. However, the caveat is: This service removes the secondary structure information, and up to now I have manually copy-pasted it into the new pdb file (Annoying work, really). However, PyMOL's built-in commands end up being much easier to use... I wish I'd realized that before I wrote my parser. Hehe, will have to learn them,... joerg Internet et mail gratuit AltaVista http://www.altavista.fr
Re: [PyMOL] Secondary structure assignments
Yes, please. There are some structures that have to be generated by using symmetry operations defined in the REMARK 350 lines in the pdb file (example: 1jjy.pdb). The only way (I know of, if you know a better one, please tell me) to do this is going to http://pqs.ebi.ac.uk where the complete structure is generated for you. However, the caveat is: This service removes the secondary structure information, and up to now I have manually copy-pasted it into the new pdb file (Annoying work, really). Unfortunately, the script I came up with won't deal with that; it basically uses a third-party program to rescan the input file and uses the alter command to correctly set the structure (or combines this with file loading as a single command). If anyone would like this, I'm happy to email it to them, but it's not really a good general solution. How hard would it be to incorporate the DSSP algorithm? I was looking at the source for RasMol, which has a complete implementation. My feeling is that this could be ported without too much misery. However, RasMol's license terms are different, and I suspect even a complete translation into Python with the ChemPy API would still be considered a derivative work, meaning it wouldn't be able to be part of the main distribution, and meaning someone would still have to code DSSP from scratch. (I have utterly no idea how it works, but RasMol's code seems clear enough despite lack of comments) -Nat
Re: [PyMOL] Secondary structure assignments
Nat, You read my mind. Having just converted the output of DSSP manually to PDB records last week I was eyeing the source to util.ss wondering how to turn it into a dssp parser. Ideally util.ss could become a shell that would know (from the environment?) if dssp or similar was installed, then either run dssp and parse the output to assign the ss, or else run the ss asignment code in the current util.ss if no other options were available. The ability to write a pdb with the newly generated ss information would be useful as well (or perhaps pymol already can do this if it knows the protein's ss?). Thanks Russell Poyner I've been fiddling with this for my own work; I wrote a parser in Perl to embed structural annotation in a PDB file based on output from DSSP, STRIDE, or RasMol. Unfortunately it doesn't handle multiple chains yet, but I'm working on making it more general. I suppose since I only use this for loading files into PyMOL, I could just write it in Python as a PyMOL module. . . would that be useful to anyone else?
Re: [PyMOL] Secondary structure assignments
Ideally util.ss could become a shell that would know (from the environment?) if dssp or similar was installed, then either run dssp and parse the output to assign the ss, or else run the ss asignment code in the current util.ss if no other options were available. I've basically done this, though right now it uses STRIDE because the output is easier to parse- it just uses popen2() to read the output from the STRIDE executable (Does anyone actually know what the difference is between these two programs?). But since I already wrote a dssp parser in Perl, it shouldn't take long to modify. My feeling is that it would be better to have a robust secondary structure algorithm built in, since I've already hit limitations in the method I'm using. Though to be honest, I've been getting away with using util.ss for some time now. The ability to write a pdb with the newly generated ss information would be useful as well (or perhaps pymol already can do this if it knows the protein's ss?). I've done this too, though I think it breaks with more than one chain right now. If I get around to cleaning this up I'd be more than happy to pass it on. -Nat
Re: [PyMOL] Secondary structure assignments
OK, heres what we've got: The DSSP program is available for Linux and Windows from http://www.cmbi.kun.nl/swift/dssp/ . I have written a Python script that parses the output of DSSP and alters the annotation in PyMOL. You just start the script, then You have a dssp object command available. The script can be found on my homepage, http://www.rubor.de/bioinf/pymol_extensions.html along with some useful stuff http://www.rubor.de/bioinf/index.html However, the script works for sure only on Unix. For Windows, i still need to figure out how to - redirect the output of Dssp on Windows - assign platform-independent Paths correctly. If someone could test the script, that would be great. Kristian
Re: [PyMOL] Secondary structure assignments
programs. So I am in search of a solution. Can one manually create a secondary structure assignment matrix to insert into the PDB file? I must admit that as a novice I do not understand the formatting of the secondary structure matrices that I have seen embedded in some PDB files. Is there a resource somewhere that explains the formatting of such a matrix? I've been fiddling with this for my own work; I wrote a parser in Perl to embed structural annotation in a PDB file based on output from DSSP, STRIDE, or RasMol. Unfortunately it doesn't handle multiple chains yet, but I'm working on making it more general. I suppose since I only use this for loading files into PyMOL, I could just write it in Python as a PyMOL module. . . would that be useful to anyone else? The complete PDB specification for SS annotation is here: http://www.rcsb.org/pdb/docs/format/pdbguide2.2/part_42.html http://www.rcsb.org/pdb/docs/format/pdbguide2.2/part_44.html http://www.rcsb.org/pdb/docs/format/pdbguide2.2/part_45.html However, PyMOL's built-in commands end up being much easier to use... I wish I'd realized that before I wrote my parser. Alternatively, is there a manual series of Pymol commands to directly assign secondary structure for a protein for insertion into the .pml script file? alter atom_selection, ss='L' (or 'H' or 'S', I think) Even better, is there a separate program that can assign secondary structure and then allow you to save the revised PDB file with the secondary structure assignments inserted into the PDB output. I would be willing to accept any If there is, I'd like to know too! -Nat Echols Gerstein Lab Yale University