Hi Tsjerk,

many thanks for the suggestions

in my case
csplit -b "%03d.pdb" test.pdbqt /^MODEL/ {0} > somelog.log
is not good because in always produces 000.pdb which is the empty file.
Also I dont know why but all files also consist of the xx prefix (e.g
xx000.pdb xx005.pdb etc).
so in my case below method worked much better!
#extract first model and remove some unused lines and chang the end to ter
record
sed /^ENDMDL/q my_docking.pdb | grep -v "^ROOT\|^ENDROOT\|^TORSDOF
0\|^MODEL\|^REMARK" |  sed -e 's/^ENDMDL/TER/g' > firstmodel.pdb

I noticed that sed is very powerfull utility and I should to look on some
examples expecially in its aplication in the bioinformatics ;) regarding
awk what I know is that is much useful for the extraction of the specified
columns so it might be useful for analysis of some long log files with grep
e.g
grep '^xz' log.txt | awk  '{print ($2, $3 )}'  > 2_3columns_from_the_xz.dat


James

2014-09-12 12:51 GMT+02:00 James Starlight <jmsstarli...@gmail.com>:

> Thank you very much!
>
> James
>
> 2014-09-12 12:36 GMT+02:00 Marko Hyvonen <mh...@cam.ac.uk>:
>
>> On 12/09/2014 11:26, James Starlight wrote:
>>
>>> grep -v "^ROOT\|^ENDROOT\|^TORSDOF 0\^MODEL\^REMARK"|
>>>
>>
>> I think you are missing few "|" in there:
>>
>> grep -v "^ROOT\|^ENDROOT\|^TORSDOF 0\|^MODEL\|^REMARK"
>>
>> and depending on the shell, you might be able get away with "\" by using
>> single quotation marks
>> grep -v '^ROOT|^ENDROOT|^TORSDOF 0|^MODEL|^REMARK'
>>
>> Marko
>>
>>
>> --
>>
>>  Marko Hyvonen
>>  Department of Biochemistry, University of Cambridge
>>  mh...@cam.ac.uk
>>  http://www-cryst.bioc.cam.ac.uk/groups/hyvonen
>>  tel:    +44-(0)1223-766 044
>>
>>
>
>
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Reply via email to