Re: [Biskit-general] Pymoler.py hang up and problems with template cleaning
Brought to you by:
graik
From: Raik G. <rai...@cr...> - 2008-07-23 20:09:39
|
Hi Oliver, sorry about the late response. First, concerning the pymoler bug -- which pymol version are you using? Are you running the test remotely (via ssh) or locally? Until we get a handle on this, you can always test the Mod package separately: python test.py -p Biskit.Mod -e pvm Concerning the 4 letter pdb file names -- that's indeed annoying if you want to fiddle around with things. I'll have to dive into the code to see whether that's easily changed or whether there are some downstream dependencies on the naming scheme. Please try to cook up your own fake pdb codes for the time being... not pretty, I know. The Hetatom deletion is also quite interesting. I thought we had an option to switch it off, but that doesn't seem to be the case. The PDBCleaner.py class that is doing the job behind the scenes has this option though, so it would be straightforward to tunnel the option through to the outside script. There is a deeper issue behind this though -- namely also the alignment will need to be furnished with the hetatom residues somehow. There is an option in Modeller to take hetatoms just as some neutral bulk but modeller also understands a list of typical hetatom residues and can treat them properly. Two colleagues here in Barcelona already asked me for the same feature... So what we would need to investigate is (1) what is the list of Modeller-recognized hetatom residues and (2) how are they included in the alignment? Knowing that, we can try to let the cleaner recognize these hets as well and would then need to adapt the alignment builder to add them after the alignment has been done. The manual workaround is: (1) save the hetatoms off into a separate pdb. E.g. using Biskit: ~> bispy your.pdb >>> het = x.compress( x.maskHetatm() ) >>> het.writePdb('your_hetatm.pdb') (2) Channel your protein through the clean.py, run align.py and model.py to generate all intermediary files without hetatoms. (3) Append the hetatoms back, by hand or: ~> bispy your_cleaned.pdb >>> prot = x >>> het = PDBModel('your_hetatm.pdb') >>> all = prot.concat( het ) >>> all.writePdb( 'your_cleaned.pdb') (4) Manually adapt the alignment file (final.aln, I think) and, if needed, the modeller input file. (5) run model.py again (which won't override the model.inp if it already exists. BTW, once you have done the manual tour, and if you know python, you could have a go at the code yourself ;-) Greetings, Raik Oliver Kuhn wrote: > On Mon, 2008-07-21 at 22:46 +0200, Raik Gruenberg wrote: >> Hi Oliver, >> >> On Mon, Jul 21, 2008 at 1:31 PM, Oliver Kuhn <oli...@un...> >> wrote: >> Hi Raik, >> >> it's not the Pymoler.py module causing the hang up: >> python Pymoler.py >> Pymoler test ... Adding rubor.py script as a PyMol >> command >> Adding color_b.py script as a PyMol command >> ok >> >> ---------------------------------------------------------------------- >> Ran 1 test in 10.579s >> OK >> ...runs as it should. But it hangs up when called by the >> test.py module >> (see below) >> >> This one I can't reproduce. Works all fine for me... Some questions: >> (1) which Pymol version are you using? >> version 1.1beta3 >> (2) Are you getting the Pymol screen with the mini-MD playback when >> you are running the test directly (python Pymoler.py)? >> yes, works fine >> The only difference between the direct call and the test.py call is >> that (1) the verbosity is set to 0 for the test.py version and (2) a >> 'quit' command is added to the pymol script. You can simulate this by >> adding the following line into Pymoler.py Test.test_Pymoler after line >> 587: >> >> self.local = False >> >> If you then re-run 'python Pymoler.py' does it then also hang? >> no, works fine >> >> > >>> python test.py -e pvm >> ... >> > >>> Pymoler test ... >> > >>> >> nothing comes back and then, I cannot cancel the script with >> Ctrl-C. >> Is it possible to exclude just the Pymoler module, so I can see > the test runs following afterwards. - Pymol will probably run in any > other context than with test.py >> >> Another question: >> How can I get my chain_index.txt file when I already >> have templates (and do not use search_templates.py that would >> write me >> that file)? With my manually written chain_index.txt, I get >> the >> following error: >> >> Error >> cleaning /home/oak/works/biskit/1HPV/templates/nr/1T7J.pdb >> <type 'exceptions.ValueError'> >> in /home/oak/tools/biskit/Biskit/Mod/TemplateCleaner.py line >> 270: >> ('Input argument must be 1d',). >> >> Nice one... the PDB file is found but the chain ID that you put into >> chain_index.txt does not seem to exist within the PDB. I've modified >> the code to give a more helpful error message in this case. So you >> need to specify which chain within the PDB should be used as a >> template. The chain_index parsing is pretty primitive. The chain ID >> (given next to the file name separated by whitespace or tab) has to be >> exactly identical to an existing chain within the PDB. >> >> BTW, in case you are not doing it like that already, my general >> recommendation is to first run your case through fully automatic and >> then start modifying from there. The idea of the pipeline is that, >> after your intervention, you can re-run all following steps without >> deleting anything. >> >> Some more modifications: you can now also simply give the PDB file >> name without full path, as long as the PDB file is in the same folder >> as chain_index.txt. So it's worthwhile to 'svn update'. >> > Hm, now I have the problem, that I extended the filenames of the pdb > (because of two different ligand conformers in one pdb) and the program > just takes the first 4 letters. I created 1T7J_A.pdb and 1T7J_B.pdb from > 1T7J.pdb. The program then writes both cleaned files to > nr_cleaned/1T7J.pdb. Maybe, you should allow for longer filenames, > because it is helpful to keep the source-pdb-id as filename-stem. > > clean_templates.py > > CLEANING /home/oak/works/biskit/amprenavir/1HPV_1T7J/templates/nr/1T7J_A.pdb... > 1T7J: Removing multiple occupancies of atoms ... > ... > CLEANING /home/oak/works/biskit/amprenavir/1HPV_1T7J/templates/nr/1T7J_B.pdb... > > So, I still wasn't able to get an alignment as modeller input. > I can already see, that the ligand (all HETATMs) will be deleted, - so > when does the ligand come into play again? > > The mentioned ideas are easily visible from the dir-structure and > program behaviour and looks very handy. I hope I can get used to it > soon. :-) > > thanx in advance > Oliver > > >> Good luck! >> Raik >> >> >> >> Sorry, for writing direct to your mail-address. I will start a >> new >> thread in the mailing list next. >> >> greets >> Oliver >> >> >> -- >> Oliver Kuhn, Zentrum für Medizinische Biotechnologie, >> Universität Duisburg-Essen, Universitätsstr. 2, 45117 Essen, >> Germany >> phone +49 201 183-2438, oli...@un... >> >> >> -- ________________________________ Dr. Raik Gruenberg http://www.raiks.de/contact.html ________________________________ |