Re: [PyMOL] Shell utilities for structural bioinformatics

2014-09-12 Thread James Starlight
Hi,

some new question.

I need to some combination of shell utilities to split multi_model.pdb on
several pdbs  as well as separate command to seek multi_model.pdb and to
save only this model as the separare model1.pdb. I've tried to do it using
grep
grep '^MODEL 1' my_docking.pdb > model1.pdb

but results were empty.

James

2014-09-08 15:48 GMT+02:00 James Starlight :

> Thanks you very much!
>
> James
>
> 2014-09-05 20:18 GMT+02:00 Folmer Fredslund :
>
>> Hi
>>
>> Small correction to Gianlucas suggestion
>>
>> ">" will direct the output to a file, overwriting the contents
>> ">>" will direct the output to a file, appending the contents
>>
>> Venlig hilsen
>> Folmer Fredslund
>> Den 05/09/2014 19.16 skrev "Gianluca Santoni" :
>>
>> Don't even need cat
>>> simply do
>>>
>>> grep PPC ref.pdb > tar_i.pdb
>>>
>>> redirecting std out with > appends it directly to the file (after the
>>> last line)
>>>
>>> Cheers
>>>
>>> On 9/5/14 6:48 PM, James Starlight wrote:
>>> > Dear Pymol users!
>>> >
>>> > I've decided to open new topic focused on the implementation of the
>>> > common shell utilities like grep awk and sed for the structural
>>> > bioinformatics tasks like processing and editing of the large sets of
>>> pdbs.
>>> >
>>> > In my current task I need to copy all lipids from one pdb (called it
>>> > ref) to another call it tar_i.pdb (both files have the same 3D shape
>>> and
>>> > have been superimposed before that): so in that case I guess lipids
>>> > could be recognized by residue name in pdb file (PPC) as well as by its
>>> > #4 column number (what is actually do grep).  So the algorithm might
>>> be:
>>> > select from the ref.pdb all strings where #4 column is PPC and merge it
>>> > (by means of CAT I guess) with the tar_i.pdb. Please show me some
>>> > example of the one-line method of this realization.
>>> >
>>> > Thanks,
>>> >
>>> > James
>>> >
>>> >
>>> >
>>> --
>>> > Slashdot TV.
>>> > Video for Nerds.  Stuff that matters.
>>> > http://tv.slashdot.org/
>>> >
>>> >
>>> >
>>> > ___
>>> > 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
>>> >
>>>
>>>
>>> --
>>> Gianluca Santoni,
>>> Dynamop Group
>>> Institut de Biologie Structurale
>>> 6 rue Jules Horowitz
>>> 38027 Grenoble Cedex 1
>>> France
>>> _
>>> Please avoid sending me Word or PowerPoint attachments.
>>> See http://www.gnu.org/philosophy/no-word-attachments.html
>>>
>>>
>>> --
>>> Slashdot TV.
>>> Video for Nerds.  Stuff that matters.
>>> http://tv.slashdot.org/
>>> ___
>>> 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
>>>
>>
>>
>> --
>> Slashdot TV.
>> Video for Nerds.  Stuff that matters.
>> http://tv.slashdot.org/
>> ___
>> 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
>>
>
>
--
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

Re: [PyMOL] Shell utilities for structural bioinformatics

2014-09-12 Thread Tsjerk Wassenaar
Hi James,

These are the sort of questions that'll be answered elsewhere. Most notably
on stackoverflow:
http://stackoverflow.com/questions/18364411/using-regex-to-tell-csplit-where-to-split-the-file

csplit -b "%04d.pdb" file.pdb /^MODEL/ {*}

Cheers,

Tsjerk


On Fri, Sep 12, 2014 at 11:25 AM, James Starlight 
wrote:

> Hi,
>
> some new question.
>
> I need to some combination of shell utilities to split multi_model.pdb on
> several pdbs  as well as separate command to seek multi_model.pdb and to
> save only this model as the separare model1.pdb. I've tried to do it using
> grep
> grep '^MODEL 1' my_docking.pdb > model1.pdb
>
> but results were empty.
>
> James
>
> 2014-09-08 15:48 GMT+02:00 James Starlight :
>
>> Thanks you very much!
>>
>> James
>>
>> 2014-09-05 20:18 GMT+02:00 Folmer Fredslund :
>>
>>> Hi
>>>
>>> Small correction to Gianlucas suggestion
>>>
>>> ">" will direct the output to a file, overwriting the contents
>>> ">>" will direct the output to a file, appending the contents
>>>
>>> Venlig hilsen
>>> Folmer Fredslund
>>> Den 05/09/2014 19.16 skrev "Gianluca Santoni" :
>>>
>>> Don't even need cat
 simply do

 grep PPC ref.pdb > tar_i.pdb

 redirecting std out with > appends it directly to the file (after the
 last line)

 Cheers

 On 9/5/14 6:48 PM, James Starlight wrote:
 > Dear Pymol users!
 >
 > I've decided to open new topic focused on the implementation of the
 > common shell utilities like grep awk and sed for the structural
 > bioinformatics tasks like processing and editing of the large sets of
 pdbs.
 >
 > In my current task I need to copy all lipids from one pdb (called it
 > ref) to another call it tar_i.pdb (both files have the same 3D shape
 and
 > have been superimposed before that): so in that case I guess lipids
 > could be recognized by residue name in pdb file (PPC) as well as by
 its
 > #4 column number (what is actually do grep).  So the algorithm might
 be:
 > select from the ref.pdb all strings where #4 column is PPC and merge
 it
 > (by means of CAT I guess) with the tar_i.pdb. Please show me some
 > example of the one-line method of this realization.
 >
 > Thanks,
 >
 > James
 >
 >
 >
 --
 > Slashdot TV.
 > Video for Nerds.  Stuff that matters.
 > http://tv.slashdot.org/
 >
 >
 >
 > ___
 > 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
 >


 --
 Gianluca Santoni,
 Dynamop Group
 Institut de Biologie Structurale
 6 rue Jules Horowitz
 38027 Grenoble Cedex 1
 France
 _
 Please avoid sending me Word or PowerPoint attachments.
 See http://www.gnu.org/philosophy/no-word-attachments.html


 --
 Slashdot TV.
 Video for Nerds.  Stuff that matters.
 http://tv.slashdot.org/
 ___
 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

>>>
>>>
>>> --
>>> Slashdot TV.
>>> Video for Nerds.  Stuff that matters.
>>> http://tv.slashdot.org/
>>> ___
>>> 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
>>>
>>
>>
>
>
> --
> 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
>



-- 
Tsjerk A. Wassenaar, Ph.D.
--
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___

Re: [PyMOL] Shell utilities for structural bioinformatics

2014-09-12 Thread James Starlight
Hi Tsjerk,

thank you very much for help.

this is a little bioinformatics question so probably it's better to ask it
here some expert of this topic like you :)

because in my case I need to further proceed each split model model (e,g
delete some lines or make changing) piping with some commands

e,g in my case each model after spliting consist of

MODEL 1
ROOT
ATOMS
ENDROOT
TORSDOF 0
ENDMDL

i'd like to remove lines consisted of ROOT ENDROOT TORSDOF 0 and change
ENDMDL to TER

i've tried to do it

csplit -b "%04d.pdb" my_docking.pdb /^MODEL/ {*} | grep -v '^ENDROOT' |
grep -v '^TORSDOF 0' |  sed -e 's/^ENDMDL/TER/g'

but the resulted files still consist of unused lines

BTW might the csplit be used to extract only ONE (e,g first) model from the
multi-pdb file?

James

2014-09-12 11:39 GMT+02:00 Tsjerk Wassenaar :

> Hi James,
>
> These are the sort of questions that'll be answered elsewhere. Most
> notably on stackoverflow:
> http://stackoverflow.com/questions/18364411/using-regex-to-tell-csplit-where-to-split-the-file
>
> csplit -b "%04d.pdb" file.pdb /^MODEL/ {*}
>
> Cheers,
>
> Tsjerk
>
>
> On Fri, Sep 12, 2014 at 11:25 AM, James Starlight 
> wrote:
>
>> Hi,
>>
>> some new question.
>>
>> I need to some combination of shell utilities to split multi_model.pdb on
>> several pdbs  as well as separate command to seek multi_model.pdb and to
>> save only this model as the separare model1.pdb. I've tried to do it using
>> grep
>> grep '^MODEL 1' my_docking.pdb > model1.pdb
>>
>> but results were empty.
>>
>> James
>>
>> 2014-09-08 15:48 GMT+02:00 James Starlight :
>>
>>> Thanks you very much!
>>>
>>> James
>>>
>>> 2014-09-05 20:18 GMT+02:00 Folmer Fredslund :
>>>
 Hi

 Small correction to Gianlucas suggestion

 ">" will direct the output to a file, overwriting the contents
 ">>" will direct the output to a file, appending the contents

 Venlig hilsen
 Folmer Fredslund
 Den 05/09/2014 19.16 skrev "Gianluca Santoni" >>> >:

 Don't even need cat
> simply do
>
> grep PPC ref.pdb > tar_i.pdb
>
> redirecting std out with > appends it directly to the file (after the
> last line)
>
> Cheers
>
> On 9/5/14 6:48 PM, James Starlight wrote:
> > Dear Pymol users!
> >
> > I've decided to open new topic focused on the implementation of the
> > common shell utilities like grep awk and sed for the structural
> > bioinformatics tasks like processing and editing of the large sets
> of pdbs.
> >
> > In my current task I need to copy all lipids from one pdb (called it
> > ref) to another call it tar_i.pdb (both files have the same 3D shape
> and
> > have been superimposed before that): so in that case I guess lipids
> > could be recognized by residue name in pdb file (PPC) as well as by
> its
> > #4 column number (what is actually do grep).  So the algorithm might
> be:
> > select from the ref.pdb all strings where #4 column is PPC and merge
> it
> > (by means of CAT I guess) with the tar_i.pdb. Please show me some
> > example of the one-line method of this realization.
> >
> > Thanks,
> >
> > James
> >
> >
> >
> --
> > Slashdot TV.
> > Video for Nerds.  Stuff that matters.
> > http://tv.slashdot.org/
> >
> >
> >
> > ___
> > 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
> >
>
>
> --
> Gianluca Santoni,
> Dynamop Group
> Institut de Biologie Structurale
> 6 rue Jules Horowitz
> 38027 Grenoble Cedex 1
> France
> _
> Please avoid sending me Word or PowerPoint attachments.
> See http://www.gnu.org/philosophy/no-word-attachments.html
>
>
> --
> Slashdot TV.
> Video for Nerds.  Stuff that matters.
> http://tv.slashdot.org/
> ___
> 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
>


 --
 Slashdot TV.
 Video for Nerds.  Stuff that matters.
 http://tv.slashdot.org/
 ___
 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/pymo

Re: [PyMOL] Shell utilities for structural bioinformatics

2014-09-12 Thread Tsjerk Wassenaar
Hi James,

This is more text-file processing than it is bioinformatics. The trick is
to understand the problem, dissect it, and fit it to your toolbox on Linux.
That's actually much of bioinformatics :)

The first thing to understand is what data you have and what data you need
to have in the end. That will determine the tools and how to use them. To
extract the first part of a file, up to and including a tag (ENDMDL), you
could use sed:

sed /^ENDMDL/q models.pdb > firstmodel.pdb

While at it, you can also delete those lines you don't want to:

sed -e /^ROOT/d -e /^ENDROOT/d -e /^TORSDOF/d -e /^ENDMDL/q models.pdb >
firstmodel.pdb

For bioinformatics, it really pays off to read up on sed and awk.

As for the other question, yes, csplit can be used to extract one, or a
number of blocks. The {*} indicates that all blocks are to be written. {10}
indicates the first ten blocks are to be written. Check the help to see how
to use csplit to extract a specific block. I just read up on it now to be
able to answer your question. I didn't know this about csplit when I woke
up this morning.

Cheers,

Tsjerk

On Fri, Sep 12, 2014 at 12:00 PM, James Starlight 
wrote:

> Hi Tsjerk,
>
> thank you very much for help.
>
> this is a little bioinformatics question so probably it's better to ask it
> here some expert of this topic like you :)
>
> because in my case I need to further proceed each split model model (e,g
> delete some lines or make changing) piping with some commands
>
> e,g in my case each model after spliting consist of
>
> MODEL 1
> ROOT
> ATOMS
> ENDROOT
> TORSDOF 0
> ENDMDL
>
> i'd like to remove lines consisted of ROOT ENDROOT TORSDOF 0 and change
> ENDMDL to TER
>
> i've tried to do it
>
> csplit -b "%04d.pdb" my_docking.pdb /^MODEL/ {*} | grep -v '^ENDROOT' |
> grep -v '^TORSDOF 0' |  sed -e 's/^ENDMDL/TER/g'
>
> but the resulted files still consist of unused lines
>
> BTW might the csplit be used to extract only ONE (e,g first) model from
> the multi-pdb file?
>
> James
>
> 2014-09-12 11:39 GMT+02:00 Tsjerk Wassenaar :
>
>> Hi James,
>>
>> These are the sort of questions that'll be answered elsewhere. Most
>> notably on stackoverflow:
>> http://stackoverflow.com/questions/18364411/using-regex-to-tell-csplit-where-to-split-the-file
>>
>> csplit -b "%04d.pdb" file.pdb /^MODEL/ {*}
>>
>> Cheers,
>>
>> Tsjerk
>>
>>
>> On Fri, Sep 12, 2014 at 11:25 AM, James Starlight > > wrote:
>>
>>> Hi,
>>>
>>> some new question.
>>>
>>> I need to some combination of shell utilities to split multi_model.pdb
>>> on several pdbs  as well as separate command to seek multi_model.pdb and to
>>> save only this model as the separare model1.pdb. I've tried to do it using
>>> grep
>>> grep '^MODEL 1' my_docking.pdb > model1.pdb
>>>
>>> but results were empty.
>>>
>>> James
>>>
>>> 2014-09-08 15:48 GMT+02:00 James Starlight :
>>>
 Thanks you very much!

 James

 2014-09-05 20:18 GMT+02:00 Folmer Fredslund :

> Hi
>
> Small correction to Gianlucas suggestion
>
> ">" will direct the output to a file, overwriting the contents
> ">>" will direct the output to a file, appending the contents
>
> Venlig hilsen
> Folmer Fredslund
> Den 05/09/2014 19.16 skrev "Gianluca Santoni"  >:
>
> Don't even need cat
>> simply do
>>
>> grep PPC ref.pdb > tar_i.pdb
>>
>> redirecting std out with > appends it directly to the file (after the
>> last line)
>>
>> Cheers
>>
>> On 9/5/14 6:48 PM, James Starlight wrote:
>> > Dear Pymol users!
>> >
>> > I've decided to open new topic focused on the implementation of the
>> > common shell utilities like grep awk and sed for the structural
>> > bioinformatics tasks like processing and editing of the large sets
>> of pdbs.
>> >
>> > In my current task I need to copy all lipids from one pdb (called it
>> > ref) to another call it tar_i.pdb (both files have the same 3D
>> shape and
>> > have been superimposed before that): so in that case I guess lipids
>> > could be recognized by residue name in pdb file (PPC) as well as by
>> its
>> > #4 column number (what is actually do grep).  So the algorithm
>> might be:
>> > select from the ref.pdb all strings where #4 column is PPC and
>> merge it
>> > (by means of CAT I guess) with the tar_i.pdb. Please show me some
>> > example of the one-line method of this realization.
>> >
>> > Thanks,
>> >
>> > James
>> >
>> >
>> >
>> --
>> > Slashdot TV.
>> > Video for Nerds.  Stuff that matters.
>> > http://tv.slashdot.org/
>> >
>> >
>> >
>> > ___
>> > PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
>> > Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
>> > Archives:
>> 

Re: [PyMOL] Shell utilities for structural bioinformatics

2014-09-12 Thread Marko Hyvonen
Hi James,

How about

egrep -v "MODEL 1|ROOT|ATOMS|ENDROOT|TORSDOF" myoriginalfile | sed 
's/ENDMDL/TER/' > mynewfile

-v in egrep is to reverse the selection so you get all lines except that 
ones in the expression.  Without that you _only_ "grep" the lines with 
those expressions.
(egrep might be grep, or something similar depending on OS or variant of 
it)

And sed (stream editor) then s(ubstitutes) ENDMDL with TER.

hth, Marko


On 12/09/2014 11:00, James Starlight wrote:
> Hi Tsjerk,
>
> thank you very much for help.
>
> this is a little bioinformatics question so probably it's better to 
> ask it here some expert of this topic like you :)
>
> because in my case I need to further proceed each split model model 
> (e,g delete some lines or make changing) piping with some commands
>
> e,g in my case each model after spliting consist of
>
> MODEL 1
> ROOT
> ATOMS
> ENDROOT
> TORSDOF 0
> ENDMDL
>
> i'd like to remove lines consisted of ROOT ENDROOT TORSDOF 0 and 
> change ENDMDL to TER
>
> i've tried to do it
>
> csplit -b "%04d.pdb" my_docking.pdb /^MODEL/ {*} | grep -v '^ENDROOT' 
> | grep -v '^TORSDOF 0' |  sed -e 's/^ENDMDL/TER/g'
>
> but the resulted files still consist of unused lines
>
> BTW might the csplit be used to extract only ONE (e,g first) model 
> from the multi-pdb file?
>
> James
>
> 2014-09-12 11:39 GMT+02:00 Tsjerk Wassenaar  >:
>
> Hi James,
>
> These are the sort of questions that'll be answered elsewhere.
> Most notably on stackoverflow:
> 
> http://stackoverflow.com/questions/18364411/using-regex-to-tell-csplit-where-to-split-the-file
>
> csplit -b "%04d.pdb" file.pdb /^MODEL/ {*}
>
> Cheers,
>
> Tsjerk
>
>
> On Fri, Sep 12, 2014 at 11:25 AM, James Starlight
> mailto:jmsstarli...@gmail.com>> wrote:
>
> Hi,
>
> some new question.
>
> I need to some combination of shell utilities to split
> multi_model.pdb on several pdbs  as well as separate command
> to seek multi_model.pdb and to save only this model as the
> separare model1.pdb. I've tried to do it using grep
> grep '^MODEL 1' my_docking.pdb > model1.pdb
>
> but results were empty.
>
> James
>
> 2014-09-08 15:48 GMT+02:00 James Starlight
> mailto:jmsstarli...@gmail.com>>:
>
> Thanks you very much!
>
> James
>
> 2014-09-05 20:18 GMT+02:00 Folmer Fredslund
> mailto:folm...@gmail.com>>:
>
> Hi
>
> Small correction to Gianlucas suggestion
>
> ">" will direct the output to a file, overwriting the
> contents
> ">>" will direct the output to a file, appending the
> contents
>
> Venlig hilsen
> Folmer Fredslund
>
> Den 05/09/2014 19.16 skrev "Gianluca Santoni"
>  >:
>
> Don't even need cat
> simply do
>
> grep PPC ref.pdb > tar_i.pdb
>
> redirecting std out with > appends it directly to
> the file (after the
> last line)
>
> Cheers
>
> On 9/5/14 6:48 PM, James Starlight wrote:
> > Dear Pymol users!
> >
> > I've decided to open new topic focused on the
> implementation of the
> > common shell utilities like grep awk and sed for
> the structural
> > bioinformatics tasks like processing and editing
> of the large sets of pdbs.
> >
> > In my current task I need to copy all lipids
> from one pdb (called it
> > ref) to another call it tar_i.pdb (both files
> have the same 3D shape and
> > have been superimposed before that): so in that
> case I guess lipids
> > could be recognized by residue name in pdb file
> (PPC) as well as by its
> > #4 column number (what is actually do grep).  So
> the algorithm might be:
> > select from the ref.pdb all strings where #4
> column is PPC and merge it
> > (by means of CAT I guess) with the tar_i.pdb.
> Please show me some
> > example of the one-line method of this realization.
> >
> > Thanks,
> >
> > James
> >
> >
> >
> 
> --
> > 

Re: [PyMOL] Shell utilities for structural bioinformatics

2014-09-12 Thread James Starlight
Hi Marko,

in my case

this (long ) is works fine

gleb@gpu2:~/Documents/script/docking/Complex/OR1A1_MULTI> cat receptor.pdb
xx001.pdb  | grep -v '^ROOT'| grep -v '^ENDROOT' | grep -v '^TORSDOF 0' |
grep -v '^MODEL' | grep -v '^REMARK' |  sed -e 's/^ENDMDL/TER/g' >
complex.pdb


but in the below case grep (in one command style) was not work

gleb@gpu2:~/Documents/script/docking/Complex/OR1A1_MULTI> cat receptor.pdb
xx001.pdb  | grep -v "^ROOT\|^ENDROOT\|^TORSDOF 0\^MODEL\^REMARK"|  sed -e
's/^ENDMDL/TER/g' > complex.pdb



2014-09-12 12:16 GMT+02:00 Marko Hyvonen :

> Hi James,
>
> How about
>
> egrep -v "MODEL 1|ROOT|ATOMS|ENDROOT|TORSDOF" myoriginalfile | sed
> 's/ENDMDL/TER/' > mynewfile
>
> -v in egrep is to reverse the selection so you get all lines except that
> ones in the expression.  Without that you _only_ "grep" the lines with
> those expressions.
> (egrep might be grep, or something similar depending on OS or variant of
> it)
>
> And sed (stream editor) then s(ubstitutes) ENDMDL with TER.
>
> hth, Marko
>
>
> On 12/09/2014 11:00, James Starlight wrote:
> > Hi Tsjerk,
> >
> > thank you very much for help.
> >
> > this is a little bioinformatics question so probably it's better to
> > ask it here some expert of this topic like you :)
> >
> > because in my case I need to further proceed each split model model
> > (e,g delete some lines or make changing) piping with some commands
> >
> > e,g in my case each model after spliting consist of
> >
> > MODEL 1
> > ROOT
> > ATOMS
> > ENDROOT
> > TORSDOF 0
> > ENDMDL
> >
> > i'd like to remove lines consisted of ROOT ENDROOT TORSDOF 0 and
> > change ENDMDL to TER
> >
> > i've tried to do it
> >
> > csplit -b "%04d.pdb" my_docking.pdb /^MODEL/ {*} | grep -v '^ENDROOT'
> > | grep -v '^TORSDOF 0' |  sed -e 's/^ENDMDL/TER/g'
> >
> > but the resulted files still consist of unused lines
> >
> > BTW might the csplit be used to extract only ONE (e,g first) model
> > from the multi-pdb file?
> >
> > James
> >
> > 2014-09-12 11:39 GMT+02:00 Tsjerk Wassenaar  > >:
> >
> > Hi James,
> >
> > These are the sort of questions that'll be answered elsewhere.
> > Most notably on stackoverflow:
> >
> http://stackoverflow.com/questions/18364411/using-regex-to-tell-csplit-where-to-split-the-file
> >
> > csplit -b "%04d.pdb" file.pdb /^MODEL/ {*}
> >
> > Cheers,
> >
> > Tsjerk
> >
> >
> > On Fri, Sep 12, 2014 at 11:25 AM, James Starlight
> > mailto:jmsstarli...@gmail.com>> wrote:
> >
> > Hi,
> >
> > some new question.
> >
> > I need to some combination of shell utilities to split
> > multi_model.pdb on several pdbs  as well as separate command
> > to seek multi_model.pdb and to save only this model as the
> > separare model1.pdb. I've tried to do it using grep
> > grep '^MODEL 1' my_docking.pdb > model1.pdb
> >
> > but results were empty.
> >
> > James
> >
> > 2014-09-08 15:48 GMT+02:00 James Starlight
> > mailto:jmsstarli...@gmail.com>>:
> >
> > Thanks you very much!
> >
> > James
> >
> > 2014-09-05 20:18 GMT+02:00 Folmer Fredslund
> > mailto:folm...@gmail.com>>:
> >
> > Hi
> >
> > Small correction to Gianlucas suggestion
> >
> > ">" will direct the output to a file, overwriting the
> > contents
> > ">>" will direct the output to a file, appending the
> > contents
> >
> > Venlig hilsen
> > Folmer Fredslund
> >
> > Den 05/09/2014 19.16 skrev "Gianluca Santoni"
> >  > >:
> >
> > Don't even need cat
> > simply do
> >
> > grep PPC ref.pdb > tar_i.pdb
> >
> > redirecting std out with > appends it directly to
> > the file (after the
> > last line)
> >
> > Cheers
> >
> > On 9/5/14 6:48 PM, James Starlight wrote:
> > > Dear Pymol users!
> > >
> > > I've decided to open new topic focused on the
> > implementation of the
> > > common shell utilities like grep awk and sed for
> > the structural
> > > bioinformatics tasks like processing and editing
> > of the large sets of pdbs.
> > >
> > > In my current task I need to copy all lipids
> > from one pdb (called it
> > > ref) to another call it tar_i.pdb (both files
> > have the same 3D shape and
> > > have been superimposed before that): so in that
> > case I guess lipids
> >   

Re: [PyMOL] Shell utilities for structural bioinformatics

2014-09-12 Thread James Starlight
Thank you very much!

James

2014-09-12 12:36 GMT+02:00 Marko Hyvonen :

> 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

Re: [PyMOL] Shell utilities for structural bioinformatics

2014-09-12 Thread James Starlight
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 :

> Thank you very much!
>
> James
>
> 2014-09-12 12:36 GMT+02:00 Marko Hyvonen :
>
>> 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

Re: [PyMOL] Shell utilities for structural bioinformatics

2014-09-12 Thread Tsjerk Wassenaar
> csplit -b "%03d.pdb" test.pdbqt /^MODEL/ {0} > somelog.log
>

man csplit:

csplit -f blabla -b "%03d.pdb" test.pdbqt /^MODEL/ {1}

But you want only the first frame anyway, so no real use for csplit...

sed /^ENDMDL/q my_docking.pdb | grep -v "^ROOT\|^ENDROOT\|^TORSDOF
> 0\|^MODEL\|^REMARK" |  sed -e 's/^ENDMDL/TER/g' > firstmodel.pdb
>

sed -e '/^ENDMDL/{s/^.*/TER/;q;}' -e '/^\(ROOT\|ENDROOT\|TORSDOF
0\|MODEL\|REMARK\)/d' my_docking.pdb > firstmodel.pdb

... shorter and one process running in stead of 3.

Cheers,

Tsjerk

-- 
Tsjerk A. Wassenaar, Ph.D.
--
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

[PyMOL] Slow down the frame rate

2014-09-12 Thread Chen Zhao
Dear all,

I am now having a problem of changing the frame rate when saving the movie.
Even if I set the frame rate by "Movie->frame rate", the frame rate will
stay at the default value if I save the movie as MPEG file. I know there is
another way to do this, in which I save all the frames as png files and put
them together at a slower rate by a movie maker. However, the problem here
is that the resolution seems to degrade a lot. The packages I tried are
emcoder and imagemagick because I am using a linux machine.

Does anybody have suggestions on how to make high resolution movie at
slower frame rate? Or in other words, does anybody have clues to one of the
following 3 points:
1) save movie in pymol at a different frame rate
2) a movie maker that can join png files into a high quality movie
3) a software that can change the frame rate of existing mpg movies

Thank you so much,
Chen
--
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

Re: [PyMOL] Slow down the frame rate

2014-09-12 Thread Chen Zhao
I am sorry that I forgot to mention, the reason why I cannot make movie
with more frames is that I am working on a morph from an external. That
software has a maximum number of frames to output.

Thank you,
Chen

On Fri, Sep 12, 2014 at 4:19 PM, Chen Zhao  wrote:

> Dear all,
>
> I am now having a problem of changing the frame rate when saving the
> movie. Even if I set the frame rate by "Movie->frame rate", the frame rate
> will stay at the default value if I save the movie as MPEG file. I know
> there is another way to do this, in which I save all the frames as png
> files and put them together at a slower rate by a movie maker. However, the
> problem here is that the resolution seems to degrade a lot. The packages I
> tried are emcoder and imagemagick because I am using a linux machine.
>
> Does anybody have suggestions on how to make high resolution movie at
> slower frame rate? Or in other words, does anybody have clues to one of the
> following 3 points:
> 1) save movie in pymol at a different frame rate
> 2) a movie maker that can join png files into a high quality movie
> 3) a software that can change the frame rate of existing mpg movies
>
> Thank you so much,
> Chen
>
--
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

[PyMOL] pymol, problem, openGL

2014-09-12 Thread Sai Tong
I encounter the following error when starting pymol on a laptop, and as a
result,  pymol crashes.

can anyone help me to resolve this issue?


 This Executable Build integrates and extends Open-Source PyMOL 1.7.2.1.
 Detected OpenGL version 2.0 or greater. Shaders available.
 Detected GLSL version 0.0.
GLERROR: CShaderPrg_ReloadImpl begin: 1280
 OpenGL graphics engine:
  GL_VENDOR:   NVIDIA Corporation
  GL_RENDERER: Quadro K4000M/PCIe/SSE2
  GL_VERSION:  2.1.2 NVIDIA 331.20
[xcb] Extra reply data still left in queue
[xcb] This is most likely caused by a broken X extension library
[xcb] Aborting, sorry about that.
pymol.exe: xcb_io.c:575: _XReply: Assertion
`!xcb_xlib_extra_reply_data_left' failed.
Abort (core dumped)
--
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

[PyMOL] PyMol Dynamics plugin config

2014-09-12 Thread N. S.
Dear, PyMol-Gromacs experts,

I used to use PyMol  Dynamics plugin to make some MDs.
It makes me more than sad  I always get  notes like:
-
NOTE 1 [file em.mdp]:
  You are using a plain Coulomb cut-off, which might produce artifacts.
  You might want to consider using PME electrostatics.

NOTE 2 [file pr.mdp]:
  The Berendsen thermostat does not generate the correct kinetic energy
  distribution. You might want to consider using the V-rescale thermostat.
-
Does anybody know how do I adjust config.files to make default PME
and  V-rescale thermostat ? And where are the corresponding files, please ?

And,  I am sory, another quest., How do I make the plugin produce .xtc
tarajectory files instead of trr, tpr.., by default ?

Thank you in advance,

Happy journay through the Universe,
--
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

Re: [PyMOL] PyMol Dynamics plugin config

2014-09-12 Thread Tsjerk Wassenaar
Hi Niyaz,

The author of the package will have the best answers to these questions.
But you should be able to find in the source files where the mdp file is
written. There you can make changes, to make sure that coulombtype is set
to PME and tcoupltype is set to v-rescale. In addition, you probably want
to set nstxtcout to some value to get an XTC file.

To find the file(s) where the mdp stuff is handled, you can go to the
directory with the source code and run

find -name "*.py" -exec grep mdp {} \; -print

That will find .py files, grep each file found for mdp and print the
filename if it was found.

Hope it helps,

Tsjerk
On Sep 13, 2014 6:16 AM, "N. S."  wrote:

> Dear, PyMol-Gromacs experts,
>
> I used to use PyMol  Dynamics plugin to make some MDs.
> It makes me more than sad  I always get  notes like:
> -
> NOTE 1 [file em.mdp]:
>   You are using a plain Coulomb cut-off, which might produce artifacts.
>   You might want to consider using PME electrostatics.
>
> NOTE 2 [file pr.mdp]:
>   The Berendsen thermostat does not generate the correct kinetic energy
>   distribution. You might want to consider using the V-rescale thermostat.
> -
> Does anybody know how do I adjust config.files to make default PME
> and  V-rescale thermostat ? And where are the corresponding files, please ?
>
> And,  I am sory, another quest., How do I make the plugin produce .xtc
> tarajectory files instead of trr, tpr.., by default ?
>
> Thank you in advance,
>
> Happy journay through the Universe,
>
>
> --
> 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
>
--
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