Re: [PyMOL] Access to pymol commands from the terminal

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

Kind regards,

James

2014-09-22 18:50 GMT+02:00 Sampson, Jared :

>  Hi James -
>
>  On Sep 22, 2014, at 4:30 AM, James Starlight 
> wrote:
>
>   Hi Jared,
>
>
>  many thanks for the suggestion!
>  your method works perfect (i only slightly modified dir for input file)
>
> # dock each model to the ligand
> for pdb in $receptors/*.pdb; do
>   filename=$(basename "$pdb")
>   M=${filename/.pdb/}
>   echo "Processing of ${M} is initiated..."
>   #remove water and ions; change EMD to TER
>   grep -v "ATOM.*\(WAT\|NA+\|Cl-\)" $pdb | sed -e 's/^END/TER/g' >
> ${dirr}/temp/${M}_clean.pdb
>   #superimsoposition using pymol against reference
>   pymol $ref ${dirr}/temp/${M}_clean.pdb -c -q -d "super $M, $R and resi
> 2-280; save ./superimposed/${M}_aligned.pdb, $M" >
> ./superimposed/pymol_${M}.log
>   cp $ref ./superimposed
> done
>
>
>  Glad it worked for you.
>
>  two additional questions:
>
> 1) will it possible to use more flexibility in case of the selection of
> region for alignment in reference structure?
> super $M, $R and resi 2-280
>  For instance I'd like to select all residues which are part of the alpha
> helixes of the reference. how it should be done?
>
>
>  Try `$R and resi 2-280 and ss h`.  See
> http://www.pymolwiki.org/index.php/Property_Selectors for more info.
>  (That page comes up as the very first result for me on Google with “pymol
> select secondary structure” as the search term.)
>
>  2) what advantages could give me tmalign method for the superimposition
> in comparison to super and ce programs? does the coordinates of the
> reference will not changed after alignment of each mobile on it (like
> fitting in case of super) ?
>
>
>  From the description here (http://www.pymolwiki.org/index.php/TMalign)
> that TMalign, like CEalign, can be useful for structures in the “twilight
> zone,” where sequence alignment by `align` or structural alignment by
> `super` may not provide a good fit.  For any of the programs, though, only
> the mobile structures should move; the target/reference coordinates should
> always remain unchanged.
>
>  Cheers,
> Jared
>
>
>
>  James
>
> 2014-09-22 10:21 GMT+02:00 James Starlight :
>
>>  Hi Jared,
>>
>>
>>  many thanks for the suggestion!
>>  your method works perfect (i only slightly modified dir for input file)
>>
>>
>> 2014-09-19 20:19 GMT+02:00 Sampson, Jared :
>>
>>  Hi James -
>>>
>>>  I don’t have any experience with Profit.  However, instead of using
>>> "something like” PyMOL’s `super` command as you asked, you could actually
>>> use `super` in your shell session by launching PyMOL in command line
>>> mode .  Of
>>> course, you would need to modify it according to your file naming scheme,
>>> but here’s a working example.
>>>
>>>  ###
>>> #!/bin/bash
>>>
>>>  REF=reference.pdb
>>>
>>>  # grab some related pdb files to use and make one of them the reference
>>> # (obviously you won’t have to do this)
>>> i=0
>>> for pdb in 1bbd 7fab 1dba 1plg 1nl0; do
>>> pymol -c -d "fetch ${pdb}, mobile${i}, async=0; save mobile${i}.pdb"
>>> i=$((i+1))
>>> done
>>> mv mobile0.pdb $REF
>>>
>>>  # align all the mobile files to a selection in the reference file
>>> i=1
>>> for MOB in mobile*.pdb; do
>>> # strip the extensions
>>> R=$(echo $REF | sed 's/\.pdb$//')
>>> M=$(echo $MOB | sed 's/\.pdb$//')
>>>
>>>  # superimpose and save aligned mobile coordinates
>>> pymol $REF $MOB -c -q -d "super $M, $R and resi 1-110; save
>>> ${M}_aligned.pdb"
>>> done
>>>
>>>  pymol mobile*_aligned.pdb
>>> ###
>>>
>>>  You could also use CEalign if you need something citable, just switch
>>> the order of the arguments to it: `cealign $R and resi 1-110, $M`.
>>>
>>>  Hope that helps.
>>>
>>>  Cheers,
>>> Jared
>>>
>>>   --
>>> Jared Sampson
>>> Xiangpeng Kong Lab
>>> NYU Langone Medical Center
>>> http://kong.med.nyu.edu/
>>>
>>>
>>>
>>>
>>>
>>>
>>>  On Sep 19, 2014, at 6:03 AM, James Starlight 
>>> wrote:
>>>
>>>  Dear all,
>>>
>>>  I still need some help regarding some algorithm for structural
>>> superimposition of my mobile structures regarding one specified reference
>>> using some fitting method (to avoid changing in the position of the
>>> reference.pdb which is very important for me!)=>something like super
>>> command in pymol. Using ProFit I have faced with some errors during
>>> superimposition regarding the chosing reference (in case where there were
>>> some differences in the positions of ref and mob structures its alignment
>>> was not perfect (the mob had not been fully aligned on the ref) obtaining
>>> very big RMSD (20 A!) as the result although its actual value should be in
>>> range of 2-5 A. I'll be thankful for possible sollutions of this problem
>>> using Profit is there are users experienced with this software (mb it
>>> should to define fitting zones or atom subsets more accurately but I have
>>> no ideas here ) or any other alternatives which could be used as p

Re: [PyMOL] Access to pymol commands from the terminal

2014-09-22 Thread Sampson, Jared
Hi James -

On Sep 22, 2014, at 4:30 AM, James Starlight 
mailto:jmsstarli...@gmail.com>> wrote:

Hi Jared,


many thanks for the suggestion!
your method works perfect (i only slightly modified dir for input file)

# dock each model to the ligand
for pdb in $receptors/*.pdb; do
  filename=$(basename "$pdb")
  M=${filename/.pdb/}
  echo "Processing of ${M} is initiated..."
  #remove water and ions; change EMD to TER
  grep -v "ATOM.*\(WAT\|NA+\|Cl-\)" $pdb | sed -e 's/^END/TER/g' > 
${dirr}/temp/${M}_clean.pdb
  #superimsoposition using pymol against reference
  pymol $ref ${dirr}/temp/${M}_clean.pdb -c -q -d "super $M, $R and resi 2-280; 
save ./superimposed/${M}_aligned.pdb, $M" > ./superimposed/pymol_${M}.log
  cp $ref ./superimposed
done


Glad it worked for you.

two additional questions:

1) will it possible to use more flexibility in case of the selection of region 
for alignment in reference structure?
super $M, $R and resi 2-280
For instance I'd like to select all residues which are part of the alpha 
helixes of the reference. how it should be done?

Try `$R and resi 2-280 and ss h`.  See 
http://www.pymolwiki.org/index.php/Property_Selectors for more info.  (That 
page comes up as the very first result for me on Google with “pymol select 
secondary structure” as the search term.)

2) what advantages could give me tmalign method for the superimposition in 
comparison to super and ce programs? does the coordinates of the reference will 
not changed after alignment of each mobile on it (like fitting in case of 
super) ?

>From the description here (http://www.pymolwiki.org/index.php/TMalign) that 
>TMalign, like CEalign, can be useful for structures in the “twilight zone,” 
>where sequence alignment by `align` or structural alignment by `super` may not 
>provide a good fit.  For any of the programs, though, only the mobile 
>structures should move; the target/reference coordinates should always remain 
>unchanged.

Cheers,
Jared



James

2014-09-22 10:21 GMT+02:00 James Starlight 
mailto:jmsstarli...@gmail.com>>:
Hi Jared,


many thanks for the suggestion!
your method works perfect (i only slightly modified dir for input file)


2014-09-19 20:19 GMT+02:00 Sampson, Jared 
mailto:jared.samp...@nyumc.org>>:

Hi James -

I don’t have any experience with Profit.  However, instead of using "something 
like” PyMOL’s `super` command as you asked, you could actually use `super` in 
your shell session by launching PyMOL in command line 
mode.  Of course, you 
would need to modify it according to your file naming scheme, but here’s a 
working example.

###
#!/bin/bash

REF=reference.pdb

# grab some related pdb files to use and make one of them the reference
# (obviously you won’t have to do this)
i=0
for pdb in 1bbd 7fab 1dba 1plg 1nl0; do
pymol -c -d "fetch ${pdb}, mobile${i}, async=0; save mobile${i}.pdb"
i=$((i+1))
done
mv mobile0.pdb $REF

# align all the mobile files to a selection in the reference file
i=1
for MOB in mobile*.pdb; do
# strip the extensions
R=$(echo $REF | sed 's/\.pdb$//')
M=$(echo $MOB | sed 's/\.pdb$//')

# superimpose and save aligned mobile coordinates
pymol $REF $MOB -c -q -d "super $M, $R and resi 1-110; save 
${M}_aligned.pdb"
done

pymol mobile*_aligned.pdb
###

You could also use CEalign if you need something citable, just switch the order 
of the arguments to it: `cealign $R and resi 1-110, $M`.

Hope that helps.

Cheers,
Jared

--
Jared Sampson
Xiangpeng Kong Lab
NYU Langone Medical Center
http://kong.med.nyu.edu/






On Sep 19, 2014, at 6:03 AM, James Starlight 
mailto:jmsstarli...@gmail.com>> wrote:

Dear all,

I still need some help regarding some algorithm for structural superimposition 
of my mobile structures regarding one specified reference using some fitting 
method (to avoid changing in the position of the reference.pdb which is very 
important for me!)=>something like super command in pymol. Using ProFit I have 
faced with some errors during superimposition regarding the chosing reference 
(in case where there were some differences in the positions of ref and mob 
structures its alignment was not perfect (the mob had not been fully aligned on 
the ref) obtaining very big RMSD (20 A!) as the result although its actual 
value should be in range of 2-5 A. I'll be thankful for possible sollutions of 
this problem using Profit is there are users experienced with this software (mb 
it should to define fitting zones or atom subsets more accurately but I have no 
ideas here ) or any other alternatives which could be used as parts of the 
shell script.

James





--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 

Re: [PyMOL] Access to pymol commands from the terminal

2014-09-22 Thread James Starlight
Hi Jared,


many thanks for the suggestion!
your method works perfect (i only slightly modified dir for input file)

# dock each model to the ligand
for pdb in $receptors/*.pdb; do
  filename=$(basename "$pdb")
  M=${filename/.pdb/}
  echo "Processing of ${M} is initiated..."
  #remove water and ions; change EMD to TER
  grep -v "ATOM.*\(WAT\|NA+\|Cl-\)" $pdb | sed -e 's/^END/TER/g' >
${dirr}/temp/${M}_clean.pdb
  #superimsoposition using pymol against reference
  pymol $ref ${dirr}/temp/${M}_clean.pdb -c -q -d "super $M, $R and resi
2-280; save ./superimposed/${M}_aligned.pdb, $M" >
./superimposed/pymol_${M}.log
  cp $ref ./superimposed
done

two additional questions:

1) will it possible to use more flexibility in case of the selection of
region for alignment in reference structure?
super $M, $R and resi 2-280
For instance I'd like to select all residues which are part of the alpha
helixes of the reference. how it should be done?

2) what advantages could give me tmalign method for the superimposition in
comparison to super and ce programs? does the coordinates of the reference
will not changed after alignment of each mobile on it (like fitting in case
of super) ?

James

2014-09-22 10:21 GMT+02:00 James Starlight :

> Hi Jared,
>
>
> many thanks for the suggestion!
> your method works perfect (i only slightly modified dir for input file)
>
>
> 2014-09-19 20:19 GMT+02:00 Sampson, Jared :
>
>  Hi James -
>>
>>  I don’t have any experience with Profit.  However, instead of using
>> "something like” PyMOL’s `super` command as you asked, you could actually
>> use `super` in your shell session by launching PyMOL in command line mode
>> .  Of course,
>> you would need to modify it according to your file naming scheme, but
>> here’s a working example.
>>
>>  ###
>> #!/bin/bash
>>
>>  REF=reference.pdb
>>
>>  # grab some related pdb files to use and make one of them the reference
>> # (obviously you won’t have to do this)
>> i=0
>> for pdb in 1bbd 7fab 1dba 1plg 1nl0; do
>> pymol -c -d "fetch ${pdb}, mobile${i}, async=0; save mobile${i}.pdb"
>> i=$((i+1))
>> done
>> mv mobile0.pdb $REF
>>
>>  # align all the mobile files to a selection in the reference file
>> i=1
>> for MOB in mobile*.pdb; do
>> # strip the extensions
>> R=$(echo $REF | sed 's/\.pdb$//')
>> M=$(echo $MOB | sed 's/\.pdb$//')
>>
>>  # superimpose and save aligned mobile coordinates
>> pymol $REF $MOB -c -q -d "super $M, $R and resi 1-110; save
>> ${M}_aligned.pdb"
>> done
>>
>>  pymol mobile*_aligned.pdb
>> ###
>>
>>  You could also use CEalign if you need something citable, just switch
>> the order of the arguments to it: `cealign $R and resi 1-110, $M`.
>>
>>  Hope that helps.
>>
>>  Cheers,
>> Jared
>>
>>   --
>> Jared Sampson
>> Xiangpeng Kong Lab
>> NYU Langone Medical Center
>> http://kong.med.nyu.edu/
>>
>>
>>
>>
>>
>>
>>  On Sep 19, 2014, at 6:03 AM, James Starlight 
>> wrote:
>>
>>  Dear all,
>>
>>  I still need some help regarding some algorithm for structural
>> superimposition of my mobile structures regarding one specified reference
>> using some fitting method (to avoid changing in the position of the
>> reference.pdb which is very important for me!)=>something like super
>> command in pymol. Using ProFit I have faced with some errors during
>> superimposition regarding the chosing reference (in case where there were
>> some differences in the positions of ref and mob structures its alignment
>> was not perfect (the mob had not been fully aligned on the ref) obtaining
>> very big RMSD (20 A!) as the result although its actual value should be in
>> range of 2-5 A. I'll be thankful for possible sollutions of this problem
>> using Profit is there are users experienced with this software (mb it
>> should to define fitting zones or atom subsets more accurately but I have
>> no ideas here ) or any other alternatives which could be used as parts of
>> the shell script.
>>
>>  James
>>
>>
>>
>
--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&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] Access to pymol commands from the terminal

2014-09-19 Thread Sampson, Jared
Hi James -

I don’t have any experience with Profit.  However, instead of using "something 
like” PyMOL’s `super` command as you asked, you could actually use `super` in 
your shell session by launching PyMOL in command line 
mode.  Of course, you 
would need to modify it according to your file naming scheme, but here’s a 
working example.

###
#!/bin/bash

REF=reference.pdb

# grab some related pdb files to use and make one of them the reference
# (obviously you won’t have to do this)
i=0
for pdb in 1bbd 7fab 1dba 1plg 1nl0; do
pymol -c -d "fetch ${pdb}, mobile${i}, async=0; save mobile${i}.pdb"
i=$((i+1))
done
mv mobile0.pdb $REF

# align all the mobile files to a selection in the reference file
i=1
for MOB in mobile*.pdb; do
# strip the extensions
R=$(echo $REF | sed 's/\.pdb$//')
M=$(echo $MOB | sed 's/\.pdb$//')

# superimpose and save aligned mobile coordinates
pymol $REF $MOB -c -q -d "super $M, $R and resi 1-110; save 
${M}_aligned.pdb"
done

pymol mobile*_aligned.pdb
###

You could also use CEalign if you need something citable, just switch the order 
of the arguments to it: `cealign $R and resi 1-110, $M`.

Hope that helps.

Cheers,
Jared

--
Jared Sampson
Xiangpeng Kong Lab
NYU Langone Medical Center
http://kong.med.nyu.edu/






On Sep 19, 2014, at 6:03 AM, James Starlight 
mailto:jmsstarli...@gmail.com>> wrote:

Dear all,

I still need some help regarding some algorithm for structural superimposition 
of my mobile structures regarding one specified reference using some fitting 
method (to avoid changing in the position of the reference.pdb which is very 
important for me!)=>something like super command in pymol. Using ProFit I have 
faced with some errors during superimposition regarding the chosing reference 
(in case where there were some differences in the positions of ref and mob 
structures its alignment was not perfect (the mob had not been fully aligned on 
the ref) obtaining very big RMSD (20 A!) as the result although its actual 
value should be in range of 2-5 A. I'll be thankful for possible sollutions of 
this problem using Profit is there are users experienced with this software (mb 
it should to define fitting zones or atom subsets more accurately but I have no 
ideas here ) or any other alternatives which could be used as parts of the 
shell script.

James


--
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&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] Access to pymol commands from the terminal

2014-09-19 Thread James Starlight
Dear all,

I still need some help regarding some algorithm for structural
superimposition of my mobile structures regarding one specified reference
using some fitting method (to avoid changing in the position of the
reference.pdb which is very important for me!)=>something like super
command in pymol. Using ProFit I have faced with some errors during
superimposition regarding the chosing reference (in case where there were
some differences in the positions of ref and mob structures its alignment
was not perfect (the mob had not been fully aligned on the ref) obtaining
very big RMSD (20 A!) as the result although its actual value should be in
range of 2-5 A. I'll be thankful for possible sollutions of this problem
using Profit is there are users experienced with this software (mb it
should to define fitting zones or atom subsets more accurately but I have
no ideas here ) or any other alternatives which could be used as parts of
the shell script.

James

2014-09-15 18:52 GMT+04:00 James Starlight :

> Hey,
>
> I've occasionally deleted my profit script which do superimposition
> automatically so I'll be very thankful if someone remind me profit input
> script syntax
>
> for my case
> profit -h -f script.txt ref.pdb tar.pdb
>
> should do actual superimposition where in script.txt;
> ATOMS CA
> ZONE 2-290:2-290
> FIT
> WRITE fitted.pdb
>
> unfortunately this end with the error
>Starting script: 'new.profit'
>Unrecognised keyword: FIT
>Error==> Fitting has not yet been performed.
>Finished script: 'new.profit'
>
> althought those commands made from the profit command line works perfect
> ProFit>FIT
>Fitting structures...
>RMS: 7.134
>
>
> Where I made error?
>
> James
>
>
> 2014-09-12 9:13 GMT+02:00 James Starlight :
>
>> Hi Jared,
>>
>> yes from pymol it's OK, here I've mentioned about ProFit :) but this also
>> have been solved. ;)
>>
>> James
>>
>> 2014-09-11 19:43 GMT+02:00 Sampson, Jared :
>>
>>  Hi James -
>>>
>>>  What version of PyMOL are you using?  For me, using Open Source PyMOL
>>> 1.7.2.0, a typical PDB file I tested ends up with more information in that
>>> column, not less, after saving from PyMOL:
>>>
>>>  Before:
>>> ATOM   1312  NH1 ARG A 198   0.544  14.093  19.655  1.00 34.61
>>> N
>>>
>>> After:
>>> ATOM   1312  NH1 ARG A 198   0.544  14.093  19.655  1.00 34.61
>>> N1+
>>>
>>> Are you sure the column is there in your input file, and hasn’t been
>>> removed before loading into PyMOL?
>>>
>>>  Cheers,
>>> Jared
>>>
>>>   --
>>> Jared Sampson
>>> Xiangpeng Kong Lab
>>> NYU Langone Medical Center
>>> http://kong.med.nyu.edu/
>>>
>>>
>>>
>>>
>>>
>>>
>>>  On Sep 11, 2014, at 5:36 AM, James Starlight 
>>> wrote:
>>>
>>>  I guess I've passed superimpoition- it works great - with the one
>>> exception- after fitting to ref.pdb the last colum (consisted of the atom
>>> names like C, N, O etc) from the each fitted mobile.pdb has been removed. I
>>> need to keep this column on the resulted pdb because I'll use this pdb as
>>> the initial structure for the autodock docking (actually I do
>>> superimposition because I have had all input docking parameters including
>>> XYZ of the cavity for the ref structure). If the last column is missed I
>>> have promblems with the pdb2pdbqt conversion of the mobile_fit.pdb using
>>> babel. I'll thankful to everyone who have faced with the same problem and
>>> could provide me with some suggestions.
>>>
>>>
>>>  Thank for help,
>>>
>>>  James
>>>
>>> 2014-09-09 12:35 GMT+04:00 James Starlight :
>>>
>>>> Thanks Markus, I'll try to examine it!
>>>>
>>>> Jed,
>>>>
>>>>  the main problem with the profit is that I need to superimpose
>>>> structures in loop which are not always has the same sequence length. Is it
>>>> possible to superimpose each structure based on some common criterium found
>>>> for each mobile and reference automatically?
>>>>
>>>>  Kind regards,
>>>>
>>>>  James
>>>>
>>>> 2014-09-08 20:32 GMT+04:00 Markus Heller :
>>>>
>>>>>  Shot in the dark, based on reading “ensemble of the structures” and
>>>>> “ProFit”:
>>>&g

Re: [PyMOL] Access to pymol commands from the terminal

2014-09-15 Thread James Starlight
Hey,

I've occasionally deleted my profit script which do superimposition
automatically so I'll be very thankful if someone remind me profit input
script syntax

for my case
profit -h -f script.txt ref.pdb tar.pdb

should do actual superimposition where in script.txt;
ATOMS CA
ZONE 2-290:2-290
FIT
WRITE fitted.pdb

unfortunately this end with the error
   Starting script: 'new.profit'
   Unrecognised keyword: FIT
   Error==> Fitting has not yet been performed.
   Finished script: 'new.profit'

althought those commands made from the profit command line works perfect
ProFit>FIT
   Fitting structures...
   RMS: 7.134


Where I made error?

James


2014-09-12 9:13 GMT+02:00 James Starlight :

> Hi Jared,
>
> yes from pymol it's OK, here I've mentioned about ProFit :) but this also
> have been solved. ;)
>
> James
>
> 2014-09-11 19:43 GMT+02:00 Sampson, Jared :
>
>  Hi James -
>>
>>  What version of PyMOL are you using?  For me, using Open Source PyMOL
>> 1.7.2.0, a typical PDB file I tested ends up with more information in that
>> column, not less, after saving from PyMOL:
>>
>>  Before:
>> ATOM   1312  NH1 ARG A 198   0.544  14.093  19.655  1.00 34.61
>> N
>>
>> After:
>> ATOM   1312  NH1 ARG A 198   0.544  14.093  19.655  1.00 34.61
>> N1+
>>
>> Are you sure the column is there in your input file, and hasn’t been
>> removed before loading into PyMOL?
>>
>>  Cheers,
>> Jared
>>
>>   --
>> Jared Sampson
>> Xiangpeng Kong Lab
>> NYU Langone Medical Center
>> http://kong.med.nyu.edu/
>>
>>
>>
>>
>>
>>
>>  On Sep 11, 2014, at 5:36 AM, James Starlight 
>> wrote:
>>
>>  I guess I've passed superimpoition- it works great - with the one
>> exception- after fitting to ref.pdb the last colum (consisted of the atom
>> names like C, N, O etc) from the each fitted mobile.pdb has been removed. I
>> need to keep this column on the resulted pdb because I'll use this pdb as
>> the initial structure for the autodock docking (actually I do
>> superimposition because I have had all input docking parameters including
>> XYZ of the cavity for the ref structure). If the last column is missed I
>> have promblems with the pdb2pdbqt conversion of the mobile_fit.pdb using
>> babel. I'll thankful to everyone who have faced with the same problem and
>> could provide me with some suggestions.
>>
>>
>>  Thank for help,
>>
>>  James
>>
>> 2014-09-09 12:35 GMT+04:00 James Starlight :
>>
>>> Thanks Markus, I'll try to examine it!
>>>
>>> Jed,
>>>
>>>  the main problem with the profit is that I need to superimpose
>>> structures in loop which are not always has the same sequence length. Is it
>>> possible to superimpose each structure based on some common criterium found
>>> for each mobile and reference automatically?
>>>
>>>  Kind regards,
>>>
>>>  James
>>>
>>> 2014-09-08 20:32 GMT+04:00 Markus Heller :
>>>
>>>>  Shot in the dark, based on reading “ensemble of the structures” and
>>>> “ProFit”:
>>>>
>>>>
>>>>
>>>> http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2828896/
>>>>
>>>>
>>>>
>>>> CARON – Average RMSD of NMR structure ensemble
>>>>
>>>>
>>>>
>>>> Hope that helps!
>>>>
>>>>
>>>>
>>>> Markus
>>>>
>>>>
>>>>
>>>> *From:* James Starlight [mailto:jmsstarli...@gmail.com]
>>>> *Sent:* Monday, September 08, 2014 6:52 AM
>>>> *To:* pymol-users
>>>> *Subject:* Re: [PyMOL] Access to pymol commands from the terminal
>>>>
>>>>
>>>>
>>>> Ok, ProFit has been passed :D
>>>>
>>>> Now I'm looking for some software which could do the same least-square
>>>> fitting for the ensemble of the structures taken it as the separate pdbs
>>>> from the work dir (I'm not sure if the mustang software could be useful for
>>>> this task)=> because looping using ProFit might be not good for me because
>>>> each time I need to provide new atom selection for the superimposition  for
>>>> each model in the ProFit's script file.
>>>>
>>>> James
>>>>
>>>>
>>>>
>>>> 2014-09-07 11:11 GMT+02:00 Maciek Dziubiński :
>>

Re: [PyMOL] Access to pymol commands from the terminal

2014-09-11 Thread Sampson, Jared
Hi James -

What version of PyMOL are you using?  For me, using Open Source PyMOL 1.7.2.0, 
a typical PDB file I tested ends up with more information in that column, not 
less, after saving from PyMOL:

Before:
ATOM   1312  NH1 ARG A 198   0.544  14.093  19.655  1.00 34.61   N

After:
ATOM   1312  NH1 ARG A 198   0.544  14.093  19.655  1.00 34.61   N1+

Are you sure the column is there in your input file, and hasn’t been removed 
before loading into PyMOL?

Cheers,
Jared

--
Jared Sampson
Xiangpeng Kong Lab
NYU Langone Medical Center
http://kong.med.nyu.edu/






On Sep 11, 2014, at 5:36 AM, James Starlight 
mailto:jmsstarli...@gmail.com>> wrote:

I guess I've passed superimpoition- it works great - with the one exception- 
after fitting to ref.pdb the last colum (consisted of the atom names like C, N, 
O etc) from the each fitted mobile.pdb has been removed. I need to keep this 
column on the resulted pdb because I'll use this pdb as the initial structure 
for the autodock docking (actually I do superimposition because I have had all 
input docking parameters including XYZ of the cavity for the ref structure). If 
the last column is missed I have promblems with the pdb2pdbqt conversion of the 
mobile_fit.pdb using babel. I'll thankful to everyone who have faced with the 
same problem and could provide me with some suggestions.


Thank for help,

James

2014-09-09 12:35 GMT+04:00 James Starlight 
mailto:jmsstarli...@gmail.com>>:
Thanks Markus, I'll try to examine it!

Jed,

the main problem with the profit is that I need to superimpose structures in 
loop which are not always has the same sequence length. Is it possible to 
superimpose each structure based on some common criterium found for each mobile 
and reference automatically?

Kind regards,

James

2014-09-08 20:32 GMT+04:00 Markus Heller 
mailto:mhel...@cdrd.ca>>:
Shot in the dark, based on reading “ensemble of the structures” and “ProFit”:

http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2828896/

CARON – Average RMSD of NMR structure ensemble

Hope that helps!

Markus

From: James Starlight 
[mailto:jmsstarli...@gmail.com<mailto:jmsstarli...@gmail.com>]
Sent: Monday, September 08, 2014 6:52 AM
To: pymol-users
Subject: Re: [PyMOL] Access to pymol commands from the terminal

Ok, ProFit has been passed :D
Now I'm looking for some software which could do the same least-square fitting 
for the ensemble of the structures taken it as the separate pdbs from the work 
dir (I'm not sure if the mustang software could be useful for this task)=> 
because looping using ProFit might be not good for me because each time I need 
to provide new atom selection for the superimposition  for each model in the 
ProFit's script file.
James

2014-09-07 11:11 GMT+02:00 Maciek Dziubiński 
mailto:pona...@gmail.com>>:

Boo
7 wrz 2014 09:26 "Jamesno Starligois ht" 
mailto:jmsstarli...@gmail.com>>napisał napisał(a):

>
> Thomas,thanks for help- I'll try to test your script!
>
> Jed, many thanks too!
>
> if I understood correctly align.profit should contain thefollowing lines:
>
> # using ProFIT to align the model to 2hi4
> open $PROFIT, "> align.profit" or die "Cannot open file align.profit\n";
> print $PROFIT "ATOMS CA\n";
> print $PROFIT "ZONE 34-513:1-480\n";
> print $PROFIT "FIT\n";
> print $PROFIT "WRITE $folder/$dir/$pdbnew\n";
> close $PROFIT;
>
> shouldn't it?
>
> that that file is provided to 1 command line
> `profit -f align.profit -h /home/jedgold/modelling/NAMD/2hi4.pdb 
> $folder/$dir/$pdbnew`;
> where 2hi4.pdb is my ref
> $pdbnew variable assosiated with the target pdb
>
> one question about align.profit: will the output aligned mobile.pdb consist 
> of all atoms? I've found that only CA atoms are used for the superimposition
> print $PROFIT "ATOMS CA\n";
>
>
> James
>
>
> --
> Slashdot TV.
> Video for Nerds.  Stuff that matters.
> http://tv.slashdot.org/
> ___
> PyMOL-users mailing list 
> (PyMOL-users@lists.sourceforge.net<mailto: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
7 wrz 2014 09:26 "James Starlight" 
mailto:jmsstarli...@gmail.com>> napisał(a):
Thomas,thanks for help- I'll try to test your script!

Jed, many thanks too!

if I understood correctly align.profit should contain thefollowing lines:

# using ProFIT to align the model to 2hi4
open $PROFIT, "> align.profit" or die "Cannot open file align.profit\n";
 

Re: [PyMOL] Access to pymol commands from the terminal

2014-09-11 Thread James Starlight
I guess I've passed superimpoition- it works great - with the one
exception- after fitting to ref.pdb the last colum (consisted of the atom
names like C, N, O etc) from the each fitted mobile.pdb has been removed. I
need to keep this column on the resulted pdb because I'll use this pdb as
the initial structure for the autodock docking (actually I do
superimposition because I have had all input docking parameters including
XYZ of the cavity for the ref structure). If the last column is missed I
have promblems with the pdb2pdbqt conversion of the mobile_fit.pdb using
babel. I'll thankful to everyone who have faced with the same problem and
could provide me with some suggestions.


Thank for help,

James

2014-09-09 12:35 GMT+04:00 James Starlight :

> Thanks Markus, I'll try to examine it!
>
> Jed,
>
> the main problem with the profit is that I need to superimpose structures
> in loop which are not always has the same sequence length. Is it possible
> to superimpose each structure based on some common criterium found for each
> mobile and reference automatically?
>
> Kind regards,
>
> James
>
> 2014-09-08 20:32 GMT+04:00 Markus Heller :
>
>>  Shot in the dark, based on reading “ensemble of the structures” and
>> “ProFit”:
>>
>>
>>
>> http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2828896/
>>
>>
>>
>> CARON – Average RMSD of NMR structure ensemble
>>
>>
>>
>> Hope that helps!
>>
>>
>>
>> Markus
>>
>>
>>
>> *From:* James Starlight [mailto:jmsstarli...@gmail.com]
>> *Sent:* Monday, September 08, 2014 6:52 AM
>> *To:* pymol-users
>> *Subject:* Re: [PyMOL] Access to pymol commands from the terminal
>>
>>
>>
>> Ok, ProFit has been passed :D
>>
>> Now I'm looking for some software which could do the same least-square
>> fitting for the ensemble of the structures taken it as the separate pdbs
>> from the work dir (I'm not sure if the mustang software could be useful for
>> this task)=> because looping using ProFit might be not good for me because
>> each time I need to provide new atom selection for the superimposition  for
>> each model in the ProFit's script file.
>>
>> James
>>
>>
>>
>> 2014-09-07 11:11 GMT+02:00 Maciek Dziubiński :
>>
>> Boo
>> 7 wrz 2014 09:26 "Jamesno Starligois ht" napisał
>> napisał(a):
>>
>>
>> >
>> > Thomas,thanks for help- I'll try to test your script!
>> >
>> > Jed, many thanks too!
>> >
>> > if I understood correctly align.profit should contain thefollowing
>> lines:
>> >
>> > # using ProFIT to align the model to 2hi4
>> > open $PROFIT, "> align.profit" or die "Cannot open file
>> align.profit\n";
>> > print $PROFIT "ATOMS CA\n";
>> > print $PROFIT "ZONE 34-513:1-480\n";
>> > print $PROFIT "FIT\n";
>> > print $PROFIT "WRITE $folder/$dir/$pdbnew\n";
>> > close $PROFIT;
>> >
>> > shouldn't it?
>> >
>> > that that file is provided to 1 command line
>> > `profit -f align.profit -h /home/jedgold/modelling/NAMD/2hi4.pdb
>> $folder/$dir/$pdbnew`;
>> > where 2hi4.pdb is my ref
>> > $pdbnew variable assosiated with the target pdb
>> >
>> > one question about align.profit: will the output aligned mobile.pdb
>> consist of all atoms? I've found that only CA atoms are used for the
>> superimposition
>> > print $PROFIT "ATOMS CA\n";
>> >
>> >
>> > 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
>>
>> 7 wrz 2014 09:26 "James Starlight"  napisał(a):
>>
>> Thomas,thanks for help- I'll try to test your script!
>>
>> Jed, many thanks too!
>>
>>
>>
>> if I understood correctly align.profit should contain thefollowing lines:
>>
>>
>>
>> # using ProFIT to align the model to 2hi4
>> open $PROFIT, "> align.profit" or die "C

Re: [PyMOL] Access to pymol commands from the terminal

2014-09-09 Thread James Starlight
Thanks Markus, I'll try to examine it!

Jed,

the main problem with the profit is that I need to superimpose structures
in loop which are not always has the same sequence length. Is it possible
to superimpose each structure based on some common criterium found for each
mobile and reference automatically?

Kind regards,

James

2014-09-08 20:32 GMT+04:00 Markus Heller :

>  Shot in the dark, based on reading “ensemble of the structures” and
> “ProFit”:
>
>
>
> http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2828896/
>
>
>
> CARON – Average RMSD of NMR structure ensemble
>
>
>
> Hope that helps!
>
>
>
> Markus
>
>
>
> *From:* James Starlight [mailto:jmsstarli...@gmail.com]
> *Sent:* Monday, September 08, 2014 6:52 AM
> *To:* pymol-users
> *Subject:* Re: [PyMOL] Access to pymol commands from the terminal
>
>
>
> Ok, ProFit has been passed :D
>
> Now I'm looking for some software which could do the same least-square
> fitting for the ensemble of the structures taken it as the separate pdbs
> from the work dir (I'm not sure if the mustang software could be useful for
> this task)=> because looping using ProFit might be not good for me because
> each time I need to provide new atom selection for the superimposition  for
> each model in the ProFit's script file.
>
> James
>
>
>
> 2014-09-07 11:11 GMT+02:00 Maciek Dziubiński :
>
> Boo
> 7 wrz 2014 09:26 "Jamesno Starligois ht" napisał
> napisał(a):
>
>
> >
> > Thomas,thanks for help- I'll try to test your script!
> >
> > Jed, many thanks too!
> >
> > if I understood correctly align.profit should contain thefollowing lines:
> >
> > # using ProFIT to align the model to 2hi4
> > open $PROFIT, "> align.profit" or die "Cannot open file
> align.profit\n";
> > print $PROFIT "ATOMS CA\n";
> > print $PROFIT "ZONE 34-513:1-480\n";
> > print $PROFIT "FIT\n";
> > print $PROFIT "WRITE $folder/$dir/$pdbnew\n";
> > close $PROFIT;
> >
> > shouldn't it?
> >
> > that that file is provided to 1 command line
> > `profit -f align.profit -h /home/jedgold/modelling/NAMD/2hi4.pdb
> $folder/$dir/$pdbnew`;
> > where 2hi4.pdb is my ref
> > $pdbnew variable assosiated with the target pdb
> >
> > one question about align.profit: will the output aligned mobile.pdb
> consist of all atoms? I've found that only CA atoms are used for the
> superimposition
> > print $PROFIT "ATOMS CA\n";
> >
> >
> > 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
>
> 7 wrz 2014 09:26 "James Starlight"  napisał(a):
>
> Thomas,thanks for help- I'll try to test your script!
>
> Jed, many thanks too!
>
>
>
> if I understood correctly align.profit should contain thefollowing lines:
>
>
>
> # using ProFIT to align the model to 2hi4
> open $PROFIT, "> align.profit" or die "Cannot open file
> align.profit\n";
> print $PROFIT "ATOMS CA\n";
> print $PROFIT "ZONE 34-513:1-480\n";
> print $PROFIT "FIT\n";
> print $PROFIT "WRITE $folder/$dir/$pdbnew\n";
> close $PROFIT;
>
>
>
> shouldn't it?
>
>
>
> that that file is provided to 1 command line
>
> `profit -f align.profit -h /home/jedgold/modelling/NAMD/2hi4.pdb
> $folder/$dir/$pdbnew`;
>
> where 2hi4.pdb is my ref
>
> $pdbnew variable assosiated with the target pdb
>
>
>
> one question about align.profit: will the output aligned mobile.pdb
> consist of all atoms? I've found that only CA atoms are used for the
> superimposition
>
> print $PROFIT "ATOMS CA\n";
>
>
>
>
>
> 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
>
>
>
--
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] Access to pymol commands from the terminal

2014-09-08 Thread James Starlight
Ok, ProFit has been passed :D

Now I'm looking for some software which could do the same least-square
fitting for the ensemble of the structures taken it as the separate pdbs
from the work dir (I'm not sure if the mustang software could be useful for
this task)=> because looping using ProFit might be not good for me because
each time I need to provide new atom selection for the superimposition  for
each model in the ProFit's script file.

James

2014-09-07 11:11 GMT+02:00 Maciek Dziubiński :

> Boo
> 7 wrz 2014 09:26 "Jamesno Starligois ht" napisał
> napisał(a):
>
> >
> > Thomas,thanks for help- I'll try to test your script!
> >
> > Jed, many thanks too!
> >
> > if I understood correctly align.profit should contain thefollowing lines:
> >
> > # using ProFIT to align the model to 2hi4
> > open $PROFIT, "> align.profit" or die "Cannot open file
> align.profit\n";
> > print $PROFIT "ATOMS CA\n";
> > print $PROFIT "ZONE 34-513:1-480\n";
> > print $PROFIT "FIT\n";
> > print $PROFIT "WRITE $folder/$dir/$pdbnew\n";
> > close $PROFIT;
> >
> > shouldn't it?
> >
> > that that file is provided to 1 command line
> > `profit -f align.profit -h /home/jedgold/modelling/NAMD/2hi4.pdb
> $folder/$dir/$pdbnew`;
> > where 2hi4.pdb is my ref
> > $pdbnew variable assosiated with the target pdb
> >
> > one question about align.profit: will the output aligned mobile.pdb
> consist of all atoms? I've found that only CA atoms are used for the
> superimposition
> > print $PROFIT "ATOMS CA\n";
> >
> >
> > 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
>
> 7 wrz 2014 09:26 "James Starlight"  napisał(a):
>
>> Thomas,thanks for help- I'll try to test your script!
>>
>> Jed, many thanks too!
>>
>> if I understood correctly align.profit should contain thefollowing lines:
>>
>> # using ProFIT to align the model to 2hi4
>> open $PROFIT, "> align.profit" or die "Cannot open file
>> align.profit\n";
>> print $PROFIT "ATOMS CA\n";
>> print $PROFIT "ZONE 34-513:1-480\n";
>> print $PROFIT "FIT\n";
>> print $PROFIT "WRITE $folder/$dir/$pdbnew\n";
>> close $PROFIT;
>>
>> shouldn't it?
>>
>> that that file is provided to 1 command line
>> `profit -f align.profit -h /home/jedgold/modelling/NAMD/2hi4.pdb
>> $folder/$dir/$pdbnew`;
>> where 2hi4.pdb is my ref
>> $pdbnew variable assosiated with the target pdb
>>
>> one question about align.profit: will the output aligned mobile.pdb
>> consist of all atoms? I've found that only CA atoms are used for the
>> superimposition
>> print $PROFIT "ATOMS CA\n";
>>
>>
>> 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
>>
>
--
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] Access to pymol commands from the terminal

2014-09-07 Thread James Starlight
Thomas,thanks for help- I'll try to test your script!

Jed, many thanks too!

if I understood correctly align.profit should contain thefollowing lines:

# using ProFIT to align the model to 2hi4
open $PROFIT, "> align.profit" or die "Cannot open file align.profit\n";
print $PROFIT "ATOMS CA\n";
print $PROFIT "ZONE 34-513:1-480\n";
print $PROFIT "FIT\n";
print $PROFIT "WRITE $folder/$dir/$pdbnew\n";
close $PROFIT;

shouldn't it?

that that file is provided to 1 command line
`profit -f align.profit -h /home/jedgold/modelling/NAMD/2hi4.pdb
$folder/$dir/$pdbnew`;
where 2hi4.pdb is my ref
$pdbnew variable assosiated with the target pdb

one question about align.profit: will the output aligned mobile.pdb consist
of all atoms? I've found that only CA atoms are used for the superimposition
print $PROFIT "ATOMS CA\n";


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

Re: [PyMOL] Access to pymol commands from the terminal

2014-09-05 Thread Thomas Holder
Hi James,

adding my 2 cents to this conversation. Save the bash script below as 
"pymolsuper.sh".

- pymolsuper.sh -
#!/bin/bash

if [[ $# < 2 ]]; then
  echo "usage: $0 mobile.pdb target.pdb [out.pdb]"
  exit 1
fi

script="python
names = cmd.get_object_list()
cmd.super(names[0], names[1])
cmd.save(sys.argv[1] or 'out.pdb', names[0])
python end"

pymol -cqk "$1" "$2" -d "$script" -- "$3"
-

Hope that helps.

Cheers,
  Thomas

On 05 Sep 2014, at 12:13, James Starlight  wrote:

> Thanks Tsjerk!
> 
> Today I've tried some software of pairs alignment (like ce, tmalign and  
> mammoth) and found that it's not good for me because the positions of 
> reference and target are both altered as the result of the alignment by means 
> of the rotational matrix superimposition method. In my case I need to move 
> completely atoms of ref.pdb to the tar.pdb positions (whats pymol's super 
> command is actual do!)  because I need to copy some docking parameters (like 
> docking box xyz vectors) from ref to each of the target. So I'd be very 
> thankful if someone shown me most trivial case to use super command from the 
> Pymol from the terminal in a few-line method (I really wiuld like to avoid 
> some python scripts from my bash) like:
> load ref.pdb tar.pdb
> super tar.pdb ref.pdb
> save tar.pdb
> 
> 
> Thanks for help,
> 
> James
> 
> 
> 2014-09-05 13:36 GMT+02:00 Tsjerk Wassenaar :
> Hi James,
> 
> I have a light version for fitting gromacs' gro files. No time to adapt that 
> now for PDB, but it's not too hard.
> 
> ./qfit.py source.gro target.gro > output.gro
> 
> Hope it helps,
> 
> Tsjerk
> 
> 
> On Fri, Sep 5, 2014 at 12:31 PM, James Starlight  
> wrote:
> should to add 
> 
> than I've used both TMalign and mammoth utilities but didn't understand how 
> to obtain superimposed output as the full-atomic pdb's. I will be thankful if 
> someone could share with me its experience :)
> 
> James
> 
> 
> 2014-09-05 12:00 GMT+02:00 James Starlight :
> Thanks Matthew,
> 
> 
> I'll try to use this opportunity! BTW does anybody knows some simple Linux 
> utility to perform structural superimposition of 2 pdbs and obtain the 
> superimposed (target.pdb) in separate pdb file? This time I'm writing big 
> docking script where I need to superimpose each receptor against some 
> reference.pdb and use superimposed pdb for docking. Because I'll work with 
> huge pdb datasets I relly don’t want to call python each time.
> 
> James 
> 
> 
> 2014-09-04 17:12 GMT+02:00 Matthew Baumgartner :
> 
> 
> You could make a python script that import pymol and does what you want from 
> there.
>  
> Some thing like this (untested);
> 
> import __main__
> __main__.pymol_argv = ['pymol','-cqk'] # Pymol: quiet and no GUI
> import pymol
> pymol.finish_launching()
> from pymol import cmd
> 
> reffile = sys.argv[1]
> tarfile = sys.argv[2]
> outfile = sys.argv[3]
> 
> cmd.load(reffile, 'ref')
> cmd.load(tarfile, 'tar')
> cmd.align('ref', 'tar')
> cmd.save(outfile, 'ref')
> 
> 
> Then on the command line call it like: python my_align.py reffile.pdb 
> target.pdb output.pdb
> 
> On 09/04/2014 11:06 AM, James Starlight wrote:
>> thank you very much!
>> 
>> so now only my question regarding the usage of the pymol commands in command 
>> line is still open
>> 
>> BTW could someone suggest me the shell utility to make quick superimposition 
>> of the tar.pdb to  ref.pdb and save superimposed tar.pdb as the separate pdb 
>>  (the TMalign is not good because it produce pdb with both merged layers 
>> (and its backbone trace only) as the result if -o flagg is provided)
>> 
>> Kind regards,
>> 
>> Gleb
>> 
>> 
>> 2014-09-04 16:57 GMT+02:00 Matthew Baumgartner :
>> You can use sed
>> grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb | sed -e 
>> 's/^END/TER/g'  > merged.pdb
>> 
>> 
>> On 09/04/2014 10:54 AM, James Starlight wrote:
>>> thanks!
>>> 
>>> and do I need to pipe the below command to smth 
>>> grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb   > merged.pdb
>>> 
>>> if I need to change 'END' to 'TER' in the merged.pdb ?
>>> 
>>> 
>>> 2014-09-04 16:41 GMT+02:00 Matthew Baumgartner :
>>> Use the -h flag with grep to suppress the filename.
>>> Also, you don't need to pipe to cat, you can write directly to the file.
>>> 
>>> grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb   > merged.pdb
>>> 
>>> 
>>> 
>>> On 09/04/2014 10:38 AM, James Starlight wrote:
 ..and one question about grep (really didn't find it in the tutorial)
 
 using
 grep '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb |cat   > merged.pdb
 
 I've obtained good pdb BUT each line prior to the ATOM the name of the pdb 
 of the previous files have been added eg:
 
 tarr_se.pdb:ATOM  1  N   ASP X   1  35.722   8.306  92.256  0.00  
 0.00   N  
 tarr_se.pdb:ATOM  2  CA  ASP X   1  35.252   8.836  93.529  0.00  
 0.

Re: [PyMOL] Access to pymol commands from the terminal

2014-09-05 Thread James Starlight
Hi Jed!

thanks for the advise!

As I understood some commands like FIT and WRITE should be provided being
INSIDE of the profit to obtain pdb output. Does it possible to do it in one
line style from bash like profit ref tar  output etc ? BTW profit send
errors when I try to fit mob to ref and when residue number is mismatched.
Is it possible to ignore all atoms but not amino-acids from the both pdbs
(e,g in my case ref consist of the lipids as well which I need to use on
further step to copy from ref to superimposed tar) ?

THF,

James


2014-09-05 18:41 GMT+02:00 Jed Goldstone :

> I have used ProFit for that task, from Andrew Martin's group at UCL. It
> does least-squares fitting, so it's reasonably quick.
> http://www.bioinf.org.uk/software/profit/index.html
>
> Jed
>
> On 9/5/2014 6:00 AM, James Starlight wrote:
>
>> Thanks Matthew,
>>
>>
>> I'll try to use this opportunity! BTW does anybody knows some simple
>> Linux utility to perform structural superimposition of 2 pdbs and obtain
>> the superimposed (target.pdb) in separate pdb file? This time I'm
>> writing big docking script where I need to superimpose each receptor
>> against some reference.pdb and use superimposed pdb for docking. Because
>> I'll work with huge pdb datasets I relly don’t want to call python each
>> time.
>>
>> James
>>
>>
>> 2014-09-04 17:12 GMT+02:00 Matthew Baumgartner > >:
>>
>>
>>
>>
>> You could make a python script that import pymol and does what you
>> want from there.
>>
>> Some thing like this (untested);
>>
>> import __main__
>> __main__.pymol_argv = ['pymol','-cqk'] # Pymol: quiet and no GUI
>> import pymol
>> pymol.finish_launching()
>> from pymol import cmd
>>
>> reffile = sys.argv[1]
>> tarfile = sys.argv[2]
>> outfile = sys.argv[3]
>>
>> cmd.load(reffile, 'ref')
>> cmd.load(tarfile, 'tar')
>> cmd.align('ref', 'tar')
>> cmd.save(outfile, 'ref')
>>
>>
>> Then on the command line call it like: python my_align.py
>> reffile.pdb target.pdb output.pdb
>>
>> On 09/04/2014 11:06 AM, James Starlight wrote:
>>
>>> thank you very much!
>>>
>>> so now only my question regarding the usage of the pymol commands
>>> in command line is still open
>>>
>>> BTW could someone suggest me the shell utility to make quick
>>> superimposition of the tar.pdb to  ref.pdb and save superimposed
>>> tar.pdb as the separate pdb  (the TMalign is not good because it
>>> produce pdb with both merged layers (and its backbone trace only)
>>> as the result if -o flagg is provided)
>>>
>>> Kind regards,
>>>
>>> Gleb
>>>
>>>
>>> 2014-09-04 16:57 GMT+02:00 Matthew Baumgartner >> >:
>>>
>>> You can use sed
>>> grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb | sed
>>> -e 's/^END/TER/g'  > merged.pdb
>>>
>>>
>>> On 09/04/2014 10:54 AM, James Starlight wrote:
>>>
 thanks!

 and do I need to pipe the below command to smth
 grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb   >
 merged.pdb

 if I need to change 'END' to 'TER' in the merged.pdb ?


 2014-09-04 16:41 GMT+02:00 Matthew Baumgartner
 mailto:mp...@pitt.edu>>:


 Use the -h flag with grep to suppress the filename.
 Also, you don't need to pipe to cat, you can write
 directly to the file.

 grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb
 lipids.pdb   > merged.pdb



 On 09/04/2014 10:38 AM, James Starlight wrote:

> ..and one question about grep (really didn't find it in
> the tutorial)
>
> using
> grep '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb
> |cat   > merged.pdb
>
> I've obtained good pdb BUT each line prior to the ATOM
> the name of the pdb of the previous files have been
> added eg:
>
> tarr_se.pdb:ATOM  1  N ASP X   1  35.722 8.306
> 92.256  0.00 0.00   N
> tarr_se.pdb:ATOM  2  CA ASP X   1  35.252 8.836
> 93.529  0.00 0.00   C
> tarr_se.pdb:ATOM  3  C ASP X   1  35.797 10.339
> 93.708  0.00 0.00   C
> tarr_se.pdb:ATOM  4  O ASP X   1  34.979 11.297
> 93.674  0.00 0.00   O
> tarr_se.pdb:ATOM  5  CB ASP X   1  35.593 7.984
> 94.698  0.00 0.00   C
> tarr_se.pdb:ATOM  6  CG ASP X   1  34.692 8.171
> 95.960  0.00 0.00   C
> tarr_se.pdb:ATOM  7  OD1 ASP X   1  33.481
> 8.453  95.823  0.00 0.00

Re: [PyMOL] Access to pymol commands from the terminal

2014-09-05 Thread James Starlight
BTW using python script given by Matthew i've obtained error

>>> execfile ('pymol.py')
Traceback (most recent call last):
  File "", line 1, in 
  File "pymol.py", line 2, in 
import pymol
  File "pymol.py", line 4, in 
pymol.finish_launching()
AttributeError: 'module' object has no attribute 'finish_launching'


it seems that pymol could not been imported (in my case it has been
installed by package manager and normally called from the command line)- so
to avoid such problems I have not to use python :)

James


2014-09-05 18:13 GMT+02:00 James Starlight :

> Thanks Tsjerk!
>
> Today I've tried some software of pairs alignment (like ce, tmalign and
> mammoth) and found that it's not good for me because the positions of
> reference and target are both altered as the result of the alignment by
> means of the rotational matrix superimposition method. In my case I need to
> move completely atoms of ref.pdb to the tar.pdb positions (whats pymol's
> super command is actual do!)  because I need to copy some docking
> parameters (like docking box xyz vectors) from ref to each of the target.
> So I'd be very thankful if someone shown me most trivial case to use super
> command from the Pymol from the terminal in a few-line method (I really
> wiuld like to avoid some python scripts from my bash) like:
> load ref.pdb tar.pdb
> super tar.pdb ref.pdb
> save tar.pdb
>
>
> Thanks for help,
>
> James
>
>
> 2014-09-05 13:36 GMT+02:00 Tsjerk Wassenaar :
>
>> Hi James,
>>
>> I have a light version for fitting gromacs' gro files. No time to adapt
>> that now for PDB, but it's not too hard.
>>
>> ./qfit.py source.gro target.gro > output.gro
>>
>> Hope it helps,
>>
>> Tsjerk
>>
>>
>> On Fri, Sep 5, 2014 at 12:31 PM, James Starlight 
>> wrote:
>>
>>> should to add
>>>
>>> than I've used both TMalign and mammoth utilities but didn't understand
>>> how to obtain superimposed output as the full-atomic pdb's. I will be
>>> thankful if someone could share with me its experience :)
>>>
>>> James
>>>
>>>
>>> 2014-09-05 12:00 GMT+02:00 James Starlight :
>>>
 Thanks Matthew,


 I'll try to use this opportunity! BTW does anybody knows some simple
 Linux utility to perform structural superimposition of 2 pdbs and obtain
 the superimposed (target.pdb) in separate pdb file? This time I'm writing
 big docking script where I need to superimpose each receptor against some
 reference.pdb and use superimposed pdb for docking. Because I'll work with
 huge pdb datasets I relly don’t want to call python each time.

 James


 2014-09-04 17:12 GMT+02:00 Matthew Baumgartner :

>
>
> You could make a python script that import pymol and does what you
> want from there.
>
> Some thing like this (untested);
>
> import __main__
> __main__.pymol_argv = ['pymol','-cqk'] # Pymol: quiet and no GUI
> import pymol
> pymol.finish_launching()
> from pymol import cmd
>
> reffile = sys.argv[1]
> tarfile = sys.argv[2]
> outfile = sys.argv[3]
>
> cmd.load(reffile, 'ref')
> cmd.load(tarfile, 'tar')
> cmd.align('ref', 'tar')
> cmd.save(outfile, 'ref')
>
>
> Then on the command line call it like: python my_align.py reffile.pdb
> target.pdb output.pdb
>
> On 09/04/2014 11:06 AM, James Starlight wrote:
>
>   thank you very much!
>
> so now only my question regarding the usage of the pymol commands in
> command line is still open
>
>  BTW could someone suggest me the shell utility to make quick
> superimposition of the tar.pdb to  ref.pdb and save superimposed tar.pdb 
> as
> the separate pdb  (the TMalign is not good because it produce pdb with 
> both
> merged layers (and its backbone trace only) as the result if -o flagg is
> provided)
>
>  Kind regards,
>
>  Gleb
>
>
> 2014-09-04 16:57 GMT+02:00 Matthew Baumgartner :
>
>>  You can use sed
>> grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb | sed -e
>> 's/^END/TER/g'  > merged.pdb
>>
>>
>> On 09/04/2014 10:54 AM, James Starlight wrote:
>>
>>  thanks!
>>
>> and do I need to pipe the below command to smth
>> grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb   >
>> merged.pdb
>>
>>  if I need to change 'END' to 'TER' in the merged.pdb ?
>>
>>
>> 2014-09-04 16:41 GMT+02:00 Matthew Baumgartner :
>>
>>>  Use the -h flag with grep to suppress the filename.
>>> Also, you don't need to pipe to cat, you can write directly to the
>>> file.
>>>
>>> grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb   >
>>> merged.pdb
>>>
>>>
>>>
>>> On 09/04/2014 10:38 AM, James Starlight wrote:
>>>
>>>..and one question about grep (really didn't find it in the
>>> tutorial)
>>>
>>> using
>>> grep '^\(ATOM\|HETATM\|END\)' tarr_se.pdb l

Re: [PyMOL] Access to pymol commands from the terminal

2014-09-05 Thread James Starlight
Thanks Tsjerk!

Today I've tried some software of pairs alignment (like ce, tmalign and
mammoth) and found that it's not good for me because the positions of
reference and target are both altered as the result of the alignment by
means of the rotational matrix superimposition method. In my case I need to
move completely atoms of ref.pdb to the tar.pdb positions (whats pymol's
super command is actual do!)  because I need to copy some docking
parameters (like docking box xyz vectors) from ref to each of the target.
So I'd be very thankful if someone shown me most trivial case to use super
command from the Pymol from the terminal in a few-line method (I really
wiuld like to avoid some python scripts from my bash) like:
load ref.pdb tar.pdb
super tar.pdb ref.pdb
save tar.pdb


Thanks for help,

James


2014-09-05 13:36 GMT+02:00 Tsjerk Wassenaar :

> Hi James,
>
> I have a light version for fitting gromacs' gro files. No time to adapt
> that now for PDB, but it's not too hard.
>
> ./qfit.py source.gro target.gro > output.gro
>
> Hope it helps,
>
> Tsjerk
>
>
> On Fri, Sep 5, 2014 at 12:31 PM, James Starlight 
> wrote:
>
>> should to add
>>
>> than I've used both TMalign and mammoth utilities but didn't understand
>> how to obtain superimposed output as the full-atomic pdb's. I will be
>> thankful if someone could share with me its experience :)
>>
>> James
>>
>>
>> 2014-09-05 12:00 GMT+02:00 James Starlight :
>>
>>> Thanks Matthew,
>>>
>>>
>>> I'll try to use this opportunity! BTW does anybody knows some simple
>>> Linux utility to perform structural superimposition of 2 pdbs and obtain
>>> the superimposed (target.pdb) in separate pdb file? This time I'm writing
>>> big docking script where I need to superimpose each receptor against some
>>> reference.pdb and use superimposed pdb for docking. Because I'll work with
>>> huge pdb datasets I relly don’t want to call python each time.
>>>
>>> James
>>>
>>>
>>> 2014-09-04 17:12 GMT+02:00 Matthew Baumgartner :
>>>


 You could make a python script that import pymol and does what you want
 from there.

 Some thing like this (untested);

 import __main__
 __main__.pymol_argv = ['pymol','-cqk'] # Pymol: quiet and no GUI
 import pymol
 pymol.finish_launching()
 from pymol import cmd

 reffile = sys.argv[1]
 tarfile = sys.argv[2]
 outfile = sys.argv[3]

 cmd.load(reffile, 'ref')
 cmd.load(tarfile, 'tar')
 cmd.align('ref', 'tar')
 cmd.save(outfile, 'ref')


 Then on the command line call it like: python my_align.py reffile.pdb
 target.pdb output.pdb

 On 09/04/2014 11:06 AM, James Starlight wrote:

   thank you very much!

 so now only my question regarding the usage of the pymol commands in
 command line is still open

  BTW could someone suggest me the shell utility to make quick
 superimposition of the tar.pdb to  ref.pdb and save superimposed tar.pdb as
 the separate pdb  (the TMalign is not good because it produce pdb with both
 merged layers (and its backbone trace only) as the result if -o flagg is
 provided)

  Kind regards,

  Gleb


 2014-09-04 16:57 GMT+02:00 Matthew Baumgartner :

>  You can use sed
> grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb | sed -e
> 's/^END/TER/g'  > merged.pdb
>
>
> On 09/04/2014 10:54 AM, James Starlight wrote:
>
>  thanks!
>
> and do I need to pipe the below command to smth
> grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb   > merged.pdb
>
>  if I need to change 'END' to 'TER' in the merged.pdb ?
>
>
> 2014-09-04 16:41 GMT+02:00 Matthew Baumgartner :
>
>>  Use the -h flag with grep to suppress the filename.
>> Also, you don't need to pipe to cat, you can write directly to the
>> file.
>>
>> grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb   >
>> merged.pdb
>>
>>
>>
>> On 09/04/2014 10:38 AM, James Starlight wrote:
>>
>>..and one question about grep (really didn't find it in the
>> tutorial)
>>
>> using
>> grep '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb |cat   >
>> merged.pdb
>>
>>  I've obtained good pdb BUT each line prior to the ATOM the name of
>> the pdb of the previous files have been added eg:
>>
>> tarr_se.pdb:ATOM  1  N   ASP X   1  35.722   8.306  92.256
>> 0.00  0.00   N
>> tarr_se.pdb:ATOM  2  CA  ASP X   1  35.252   8.836  93.529
>> 0.00  0.00   C
>> tarr_se.pdb:ATOM  3  C   ASP X   1  35.797  10.339  93.708
>> 0.00  0.00   C
>> tarr_se.pdb:ATOM  4  O   ASP X   1  34.979  11.297  93.674
>> 0.00  0.00   O
>> tarr_se.pdb:ATOM  5  CB  ASP X   1  35.593   7.984  94.698
>> 0.00  0.00   C
>> tarr_se.pdb:ATOM  6  CG  ASP X   1  34

Re: [PyMOL] Access to pymol commands from the terminal

2014-09-05 Thread Tsjerk Wassenaar
Hi James,

I have a light version for fitting gromacs' gro files. No time to adapt
that now for PDB, but it's not too hard.

./qfit.py source.gro target.gro > output.gro

Hope it helps,

Tsjerk


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

> should to add
>
> than I've used both TMalign and mammoth utilities but didn't understand
> how to obtain superimposed output as the full-atomic pdb's. I will be
> thankful if someone could share with me its experience :)
>
> James
>
>
> 2014-09-05 12:00 GMT+02:00 James Starlight :
>
>> Thanks Matthew,
>>
>>
>> I'll try to use this opportunity! BTW does anybody knows some simple
>> Linux utility to perform structural superimposition of 2 pdbs and obtain
>> the superimposed (target.pdb) in separate pdb file? This time I'm writing
>> big docking script where I need to superimpose each receptor against some
>> reference.pdb and use superimposed pdb for docking. Because I'll work with
>> huge pdb datasets I relly don’t want to call python each time.
>>
>> James
>>
>>
>> 2014-09-04 17:12 GMT+02:00 Matthew Baumgartner :
>>
>>>
>>>
>>> You could make a python script that import pymol and does what you want
>>> from there.
>>>
>>> Some thing like this (untested);
>>>
>>> import __main__
>>> __main__.pymol_argv = ['pymol','-cqk'] # Pymol: quiet and no GUI
>>> import pymol
>>> pymol.finish_launching()
>>> from pymol import cmd
>>>
>>> reffile = sys.argv[1]
>>> tarfile = sys.argv[2]
>>> outfile = sys.argv[3]
>>>
>>> cmd.load(reffile, 'ref')
>>> cmd.load(tarfile, 'tar')
>>> cmd.align('ref', 'tar')
>>> cmd.save(outfile, 'ref')
>>>
>>>
>>> Then on the command line call it like: python my_align.py reffile.pdb
>>> target.pdb output.pdb
>>>
>>> On 09/04/2014 11:06 AM, James Starlight wrote:
>>>
>>>   thank you very much!
>>>
>>> so now only my question regarding the usage of the pymol commands in
>>> command line is still open
>>>
>>>  BTW could someone suggest me the shell utility to make quick
>>> superimposition of the tar.pdb to  ref.pdb and save superimposed tar.pdb as
>>> the separate pdb  (the TMalign is not good because it produce pdb with both
>>> merged layers (and its backbone trace only) as the result if -o flagg is
>>> provided)
>>>
>>>  Kind regards,
>>>
>>>  Gleb
>>>
>>>
>>> 2014-09-04 16:57 GMT+02:00 Matthew Baumgartner :
>>>
  You can use sed
 grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb | sed -e
 's/^END/TER/g'  > merged.pdb


 On 09/04/2014 10:54 AM, James Starlight wrote:

  thanks!

 and do I need to pipe the below command to smth
 grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb   > merged.pdb

  if I need to change 'END' to 'TER' in the merged.pdb ?


 2014-09-04 16:41 GMT+02:00 Matthew Baumgartner :

>  Use the -h flag with grep to suppress the filename.
> Also, you don't need to pipe to cat, you can write directly to the
> file.
>
> grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb   >
> merged.pdb
>
>
>
> On 09/04/2014 10:38 AM, James Starlight wrote:
>
>..and one question about grep (really didn't find it in the
> tutorial)
>
> using
> grep '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb |cat   >
> merged.pdb
>
>  I've obtained good pdb BUT each line prior to the ATOM the name of
> the pdb of the previous files have been added eg:
>
> tarr_se.pdb:ATOM  1  N   ASP X   1  35.722   8.306  92.256
> 0.00  0.00   N
> tarr_se.pdb:ATOM  2  CA  ASP X   1  35.252   8.836  93.529
> 0.00  0.00   C
> tarr_se.pdb:ATOM  3  C   ASP X   1  35.797  10.339  93.708
> 0.00  0.00   C
> tarr_se.pdb:ATOM  4  O   ASP X   1  34.979  11.297  93.674
> 0.00  0.00   O
> tarr_se.pdb:ATOM  5  CB  ASP X   1  35.593   7.984  94.698
> 0.00  0.00   C
> tarr_se.pdb:ATOM  6  CG  ASP X   1  34.692   8.171  95.960
> 0.00  0.00   C
> tarr_se.pdb:ATOM  7  OD1 ASP X   1  33.481   8.453  95.823
> 0.00  0.00   O
> tarr_se.pdb:ATOM  8  OD2 ASP X   1  35.257   8.362  97.046
> 0.00  0.00   O1-
> tarr_se.pdb:ATOM  9  HA  ASP X   1  34.180   9.033  93.580
> 0.00  0.00   H
> tarr_se.pdb:ATOM 10  HB2 ASP X   1  35.496   6.916  94.504
> 0.00  0.00   H
> tarr_se.pdb:ATOM 11  HB3 ASP X   1  36.648   7.969  94.970
> 0.00  0.00   H
>
>  such pattern are always produced by grep
>  so I'd like that tarr_se.pdb: have not been included (of course I can
> it remove easily after merging but this step is not good for me :) )
>
>  Also i'll be very thankful for any useful grep awk sed tutorial in
> case of the bioinformatics application
>
>  James
>
>
> 2014-09-04 16:03 GMT+02:00 James Starlight :
>
>>one questi

Re: [PyMOL] Access to pymol commands from the terminal

2014-09-05 Thread James Starlight
should to add

than I've used both TMalign and mammoth utilities but didn't understand how
to obtain superimposed output as the full-atomic pdb's. I will be thankful
if someone could share with me its experience :)

James


2014-09-05 12:00 GMT+02:00 James Starlight :

> Thanks Matthew,
>
>
> I'll try to use this opportunity! BTW does anybody knows some simple Linux
> utility to perform structural superimposition of 2 pdbs and obtain the
> superimposed (target.pdb) in separate pdb file? This time I'm writing big
> docking script where I need to superimpose each receptor against some
> reference.pdb and use superimposed pdb for docking. Because I'll work with
> huge pdb datasets I relly don’t want to call python each time.
>
> James
>
>
> 2014-09-04 17:12 GMT+02:00 Matthew Baumgartner :
>
>>
>>
>> You could make a python script that import pymol and does what you want
>> from there.
>>
>> Some thing like this (untested);
>>
>> import __main__
>> __main__.pymol_argv = ['pymol','-cqk'] # Pymol: quiet and no GUI
>> import pymol
>> pymol.finish_launching()
>> from pymol import cmd
>>
>> reffile = sys.argv[1]
>> tarfile = sys.argv[2]
>> outfile = sys.argv[3]
>>
>> cmd.load(reffile, 'ref')
>> cmd.load(tarfile, 'tar')
>> cmd.align('ref', 'tar')
>> cmd.save(outfile, 'ref')
>>
>>
>> Then on the command line call it like: python my_align.py reffile.pdb
>> target.pdb output.pdb
>>
>> On 09/04/2014 11:06 AM, James Starlight wrote:
>>
>>   thank you very much!
>>
>> so now only my question regarding the usage of the pymol commands in
>> command line is still open
>>
>>  BTW could someone suggest me the shell utility to make quick
>> superimposition of the tar.pdb to  ref.pdb and save superimposed tar.pdb as
>> the separate pdb  (the TMalign is not good because it produce pdb with both
>> merged layers (and its backbone trace only) as the result if -o flagg is
>> provided)
>>
>>  Kind regards,
>>
>>  Gleb
>>
>>
>> 2014-09-04 16:57 GMT+02:00 Matthew Baumgartner :
>>
>>>  You can use sed
>>> grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb | sed -e
>>> 's/^END/TER/g'  > merged.pdb
>>>
>>>
>>> On 09/04/2014 10:54 AM, James Starlight wrote:
>>>
>>>  thanks!
>>>
>>> and do I need to pipe the below command to smth
>>> grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb   > merged.pdb
>>>
>>>  if I need to change 'END' to 'TER' in the merged.pdb ?
>>>
>>>
>>> 2014-09-04 16:41 GMT+02:00 Matthew Baumgartner :
>>>
  Use the -h flag with grep to suppress the filename.
 Also, you don't need to pipe to cat, you can write directly to the file.

 grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb   > merged.pdb



 On 09/04/2014 10:38 AM, James Starlight wrote:

..and one question about grep (really didn't find it in the
 tutorial)

 using
 grep '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb |cat   > merged.pdb

  I've obtained good pdb BUT each line prior to the ATOM the name of the
 pdb of the previous files have been added eg:

 tarr_se.pdb:ATOM  1  N   ASP X   1  35.722   8.306  92.256
 0.00  0.00   N
 tarr_se.pdb:ATOM  2  CA  ASP X   1  35.252   8.836  93.529
 0.00  0.00   C
 tarr_se.pdb:ATOM  3  C   ASP X   1  35.797  10.339  93.708
 0.00  0.00   C
 tarr_se.pdb:ATOM  4  O   ASP X   1  34.979  11.297  93.674
 0.00  0.00   O
 tarr_se.pdb:ATOM  5  CB  ASP X   1  35.593   7.984  94.698
 0.00  0.00   C
 tarr_se.pdb:ATOM  6  CG  ASP X   1  34.692   8.171  95.960
 0.00  0.00   C
 tarr_se.pdb:ATOM  7  OD1 ASP X   1  33.481   8.453  95.823
 0.00  0.00   O
 tarr_se.pdb:ATOM  8  OD2 ASP X   1  35.257   8.362  97.046
 0.00  0.00   O1-
 tarr_se.pdb:ATOM  9  HA  ASP X   1  34.180   9.033  93.580
 0.00  0.00   H
 tarr_se.pdb:ATOM 10  HB2 ASP X   1  35.496   6.916  94.504
 0.00  0.00   H
 tarr_se.pdb:ATOM 11  HB3 ASP X   1  36.648   7.969  94.970
 0.00  0.00   H

  such pattern are always produced by grep
  so I'd like that tarr_se.pdb: have not been included (of course I can
 it remove easily after merging but this step is not good for me :) )

  Also i'll be very thankful for any useful grep awk sed tutorial in
 case of the bioinformatics application

  James


 2014-09-04 16:03 GMT+02:00 James Starlight :

>one question :)
>
>  could someone explain me the ussage the pymol commands from the shell
> on the example
> e.g i need to load 2 pdbs in pymol make its superimposition and than
> save one of the superimposed pdb
>  like
> load ref.pdb tar.pdb
> super tar, ref
> save tar > tar_superimposed.pdb
>
>  I've tried to do part of this using
> pymol ref.pdb tarr.pdb -cd "super tarr ref"

Re: [PyMOL] Access to pymol commands from the terminal

2014-09-05 Thread James Starlight
Thanks Matthew,


I'll try to use this opportunity! BTW does anybody knows some simple Linux
utility to perform structural superimposition of 2 pdbs and obtain the
superimposed (target.pdb) in separate pdb file? This time I'm writing big
docking script where I need to superimpose each receptor against some
reference.pdb and use superimposed pdb for docking. Because I'll work with
huge pdb datasets I relly don’t want to call python each time.

James


2014-09-04 17:12 GMT+02:00 Matthew Baumgartner :

>
>
> You could make a python script that import pymol and does what you want
> from there.
>
> Some thing like this (untested);
>
> import __main__
> __main__.pymol_argv = ['pymol','-cqk'] # Pymol: quiet and no GUI
> import pymol
> pymol.finish_launching()
> from pymol import cmd
>
> reffile = sys.argv[1]
> tarfile = sys.argv[2]
> outfile = sys.argv[3]
>
> cmd.load(reffile, 'ref')
> cmd.load(tarfile, 'tar')
> cmd.align('ref', 'tar')
> cmd.save(outfile, 'ref')
>
>
> Then on the command line call it like: python my_align.py reffile.pdb
> target.pdb output.pdb
>
> On 09/04/2014 11:06 AM, James Starlight wrote:
>
>   thank you very much!
>
> so now only my question regarding the usage of the pymol commands in
> command line is still open
>
>  BTW could someone suggest me the shell utility to make quick
> superimposition of the tar.pdb to  ref.pdb and save superimposed tar.pdb as
> the separate pdb  (the TMalign is not good because it produce pdb with both
> merged layers (and its backbone trace only) as the result if -o flagg is
> provided)
>
>  Kind regards,
>
>  Gleb
>
>
> 2014-09-04 16:57 GMT+02:00 Matthew Baumgartner :
>
>>  You can use sed
>> grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb | sed -e
>> 's/^END/TER/g'  > merged.pdb
>>
>>
>> On 09/04/2014 10:54 AM, James Starlight wrote:
>>
>>  thanks!
>>
>> and do I need to pipe the below command to smth
>> grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb   > merged.pdb
>>
>>  if I need to change 'END' to 'TER' in the merged.pdb ?
>>
>>
>> 2014-09-04 16:41 GMT+02:00 Matthew Baumgartner :
>>
>>>  Use the -h flag with grep to suppress the filename.
>>> Also, you don't need to pipe to cat, you can write directly to the file.
>>>
>>> grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb   > merged.pdb
>>>
>>>
>>>
>>> On 09/04/2014 10:38 AM, James Starlight wrote:
>>>
>>>..and one question about grep (really didn't find it in the tutorial)
>>>
>>> using
>>> grep '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb |cat   > merged.pdb
>>>
>>>  I've obtained good pdb BUT each line prior to the ATOM the name of the
>>> pdb of the previous files have been added eg:
>>>
>>> tarr_se.pdb:ATOM  1  N   ASP X   1  35.722   8.306  92.256
>>> 0.00  0.00   N
>>> tarr_se.pdb:ATOM  2  CA  ASP X   1  35.252   8.836  93.529
>>> 0.00  0.00   C
>>> tarr_se.pdb:ATOM  3  C   ASP X   1  35.797  10.339  93.708
>>> 0.00  0.00   C
>>> tarr_se.pdb:ATOM  4  O   ASP X   1  34.979  11.297  93.674
>>> 0.00  0.00   O
>>> tarr_se.pdb:ATOM  5  CB  ASP X   1  35.593   7.984  94.698
>>> 0.00  0.00   C
>>> tarr_se.pdb:ATOM  6  CG  ASP X   1  34.692   8.171  95.960
>>> 0.00  0.00   C
>>> tarr_se.pdb:ATOM  7  OD1 ASP X   1  33.481   8.453  95.823
>>> 0.00  0.00   O
>>> tarr_se.pdb:ATOM  8  OD2 ASP X   1  35.257   8.362  97.046
>>> 0.00  0.00   O1-
>>> tarr_se.pdb:ATOM  9  HA  ASP X   1  34.180   9.033  93.580
>>> 0.00  0.00   H
>>> tarr_se.pdb:ATOM 10  HB2 ASP X   1  35.496   6.916  94.504
>>> 0.00  0.00   H
>>> tarr_se.pdb:ATOM 11  HB3 ASP X   1  36.648   7.969  94.970
>>> 0.00  0.00   H
>>>
>>>  such pattern are always produced by grep
>>>  so I'd like that tarr_se.pdb: have not been included (of course I can
>>> it remove easily after merging but this step is not good for me :) )
>>>
>>>  Also i'll be very thankful for any useful grep awk sed tutorial in case
>>> of the bioinformatics application
>>>
>>>  James
>>>
>>>
>>> 2014-09-04 16:03 GMT+02:00 James Starlight :
>>>
one question :)

  could someone explain me the ussage the pymol commands from the shell
 on the example
 e.g i need to load 2 pdbs in pymol make its superimposition and than
 save one of the superimposed pdb
  like
 load ref.pdb tar.pdb
 super tar, ref
 save tar > tar_superimposed.pdb

  I've tried to do part of this using
 pymol ref.pdb tarr.pdb -cd "super tarr ref"

  but eventually obtained error

  James


 2014-09-04 15:47 GMT+02:00 James Starlight :

   Thanks Guys!
>  I'll check the tutorials.
>
>  All the best,
>
>  James
>
>
> 2014-09-04 13:15 GMT+02:00 David Hall :
>
>  (sed '1d' protein.pdb; sed '1d' lipid.pdb) > merged.pdb
>>
>> --or--
>>
>>  tail -q -n '+2' protein.pdb lipid.pdb > me

Re: [PyMOL] Access to pymol commands from the terminal

2014-09-04 Thread Matthew Baumgartner



You could make a python script that import pymol and does what you want 
from there.


Some thing like this (untested);

import __main__
__main__.pymol_argv = ['pymol','-cqk'] # Pymol: quiet and no GUI
import pymol
pymol.finish_launching()
from pymol import cmd

reffile = sys.argv[1]
tarfile = sys.argv[2]
outfile = sys.argv[3]

cmd.load(reffile, 'ref')
cmd.load(tarfile, 'tar')
cmd.align('ref', 'tar')
cmd.save(outfile, 'ref')


Then on the command line call it like: python my_align.py reffile.pdb 
target.pdb output.pdb


On 09/04/2014 11:06 AM, James Starlight wrote:

thank you very much!

so now only my question regarding the usage of the pymol commands in 
command line is still open


BTW could someone suggest me the shell utility to make quick 
superimposition of the tar.pdb to  ref.pdb and save superimposed 
tar.pdb as the separate pdb  (the TMalign is not good because it 
produce pdb with both merged layers (and its backbone trace only) as 
the result if -o flagg is provided)


Kind regards,

Gleb


2014-09-04 16:57 GMT+02:00 Matthew Baumgartner >:


You can use sed
grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb | sed -e
's/^END/TER/g'  > merged.pdb


On 09/04/2014 10:54 AM, James Starlight wrote:

thanks!

and do I need to pipe the below command to smth
grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb   >
merged.pdb

if I need to change 'END' to 'TER' in the merged.pdb ?


2014-09-04 16:41 GMT+02:00 Matthew Baumgartner mailto:mp...@pitt.edu>>:

Use the -h flag with grep to suppress the filename.
Also, you don't need to pipe to cat, you can write directly
to the file.

grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb   >
merged.pdb



On 09/04/2014 10:38 AM, James Starlight wrote:

..and one question about grep (really didn't find it in the
tutorial)

using
grep '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb |cat  
> merged.pdb


I've obtained good pdb BUT each line prior to the ATOM the
name of the pdb of the previous files have been added eg:

tarr_se.pdb:ATOM  1  N ASP X   1  35.722 8.306 
92.256  0.00 0.00   N
tarr_se.pdb:ATOM  2  CA ASP X   1  35.252 8.836 
93.529  0.00 0.00   C
tarr_se.pdb:ATOM  3  C ASP X   1  35.797 10.339 
93.708  0.00 0.00   C
tarr_se.pdb:ATOM  4  O ASP X   1  34.979 11.297 
93.674  0.00 0.00   O
tarr_se.pdb:ATOM  5  CB ASP X   1  35.593 7.984 
94.698  0.00 0.00   C
tarr_se.pdb:ATOM  6  CG ASP X   1  34.692 8.171 
95.960  0.00 0.00   C
tarr_se.pdb:ATOM  7  OD1 ASP X   1  33.481 8.453 
95.823  0.00 0.00   O
tarr_se.pdb:ATOM  8  OD2 ASP X   1  35.257 8.362 
97.046  0.00 0.00   O1-
tarr_se.pdb:ATOM  9  HA ASP X   1  34.180 9.033 
93.580  0.00 0.00   H
tarr_se.pdb:ATOM 10  HB2 ASP X   1  35.496 6.916 
94.504  0.00 0.00   H
tarr_se.pdb:ATOM 11  HB3 ASP X   1  36.648 7.969 
94.970  0.00 0.00   H


such pattern are always produced by grep
so I'd like that tarr_se.pdb: have not been included (of
course I can it remove easily after merging but this step is
not good for me :) )

Also i'll be very thankful for any useful grep awk sed
tutorial in case of the bioinformatics application

James


2014-09-04 16:03 GMT+02:00 James Starlight
mailto:jmsstarli...@gmail.com>>:

one question :)

could someone explain me the ussage the pymol commands
from the shell on the example
e.g i need to load 2 pdbs in pymol make its
superimposition and than save one of the superimposed pdb
like
load ref.pdb tar.pdb
super tar, ref
save tar > tar_superimposed.pdb

I've tried to do part of this using
pymol ref.pdb tarr.pdb -cd "super tarr ref"

but eventually obtained error

James


2014-09-04 15:47 GMT+02:00 James Starlight
mailto:jmsstarli...@gmail.com>>:

Thanks Guys!
I'll check the tutorials.

All the best,

James


2014-09-04 13:15 GMT+02:00 David Hall
mailto:li...@cowsandmilk.net>>:

(sed '1d' protein.pdb; sed '1d' lipid.pdb) >
merged.pdb

--or--

tail -q -n '+2' protein.pdb lipid.pdb > merged.pdb

-David




--
Slashdot TV.  
Video for Nerds.  Stuff th

Re: [PyMOL] Access to pymol commands from the terminal

2014-09-04 Thread James Starlight
thanks!

and do I need to pipe the below command to smth
grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb   > merged.pdb

if I need to change 'END' to 'TER' in the merged.pdb ?


2014-09-04 16:54 GMT+02:00 James Starlight :

> thanks!
>
> and do I need to pipe the below command to smth
> grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb   > merged.pdb
>
> if I need to change 'END' to 'TER' in the merged.pdb ?
>
>
> 2014-09-04 16:41 GMT+02:00 Matthew Baumgartner :
>
>  Use the -h flag with grep to suppress the filename.
>> Also, you don't need to pipe to cat, you can write directly to the file.
>>
>> grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb   > merged.pdb
>>
>>
>>
>> On 09/04/2014 10:38 AM, James Starlight wrote:
>>
>>..and one question about grep (really didn't find it in the tutorial)
>>
>> using
>> grep '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb |cat   > merged.pdb
>>
>>  I've obtained good pdb BUT each line prior to the ATOM the name of the
>> pdb of the previous files have been added eg:
>>
>> tarr_se.pdb:ATOM  1  N   ASP X   1  35.722   8.306  92.256  0.00
>> 0.00   N
>> tarr_se.pdb:ATOM  2  CA  ASP X   1  35.252   8.836  93.529  0.00
>> 0.00   C
>> tarr_se.pdb:ATOM  3  C   ASP X   1  35.797  10.339  93.708  0.00
>> 0.00   C
>> tarr_se.pdb:ATOM  4  O   ASP X   1  34.979  11.297  93.674  0.00
>> 0.00   O
>> tarr_se.pdb:ATOM  5  CB  ASP X   1  35.593   7.984  94.698  0.00
>> 0.00   C
>> tarr_se.pdb:ATOM  6  CG  ASP X   1  34.692   8.171  95.960  0.00
>> 0.00   C
>> tarr_se.pdb:ATOM  7  OD1 ASP X   1  33.481   8.453  95.823  0.00
>> 0.00   O
>> tarr_se.pdb:ATOM  8  OD2 ASP X   1  35.257   8.362  97.046  0.00
>> 0.00   O1-
>> tarr_se.pdb:ATOM  9  HA  ASP X   1  34.180   9.033  93.580  0.00
>> 0.00   H
>> tarr_se.pdb:ATOM 10  HB2 ASP X   1  35.496   6.916  94.504  0.00
>> 0.00   H
>> tarr_se.pdb:ATOM 11  HB3 ASP X   1  36.648   7.969  94.970  0.00
>> 0.00   H
>>
>>  such pattern are always produced by grep
>>  so I'd like that tarr_se.pdb: have not been included (of course I can it
>> remove easily after merging but this step is not good for me :) )
>>
>>  Also i'll be very thankful for any useful grep awk sed tutorial in case
>> of the bioinformatics application
>>
>>  James
>>
>>
>> 2014-09-04 16:03 GMT+02:00 James Starlight :
>>
>>>one question :)
>>>
>>>  could someone explain me the ussage the pymol commands from the shell
>>> on the example
>>> e.g i need to load 2 pdbs in pymol make its superimposition and than
>>> save one of the superimposed pdb
>>>  like
>>> load ref.pdb tar.pdb
>>> super tar, ref
>>> save tar > tar_superimposed.pdb
>>>
>>>  I've tried to do part of this using
>>> pymol ref.pdb tarr.pdb -cd "super tarr ref"
>>>
>>>  but eventually obtained error
>>>
>>>  James
>>>
>>>
>>> 2014-09-04 15:47 GMT+02:00 James Starlight :
>>>
>>>   Thanks Guys!
  I'll check the tutorials.

  All the best,

  James


 2014-09-04 13:15 GMT+02:00 David Hall :

  (sed '1d' protein.pdb; sed '1d' lipid.pdb) > merged.pdb
>
> --or--
>
>  tail -q -n '+2' protein.pdb lipid.pdb > merged.pdb
>
> -David
>
>
>
>
> On Thu, Sep 4, 2014 at 6:19 AM, James Starlight <
> jmsstarli...@gmail.com> wrote:
>
>> Hi Tsjerk,
>>
>>  Thanks alot!
>> Also I have the task to merge protein.pdb and lipids.pdb with some 1
>> line shell command ( like CAT) to obtain protein inserted in the lipids
>> (the seccond file is consist of the whole which can locate the protein). 
>> My
>> problem is that both protein.pdb and lipids.pdb consisted of the
>> unusuall first line which should be deleated before it merging (in my 
>> case
>> it's the HEADER lala.pdb). could you suggest me the combination of grep 
>> sed
>> command which should be used to deleate the first line from both pdbs and
>> than merge it in one-command method?
>>
>>  Many thanks,
>>
>>  James
>>
>>
>> 2014-09-04 12:48 GMT+04:00 Tsjerk Wassenaar :
>>
>>  Hi James,
>>>
>>>  You can use pymol -cd "pymolcommands". See
>>> http://www.pymolwiki.org/index.php/Command_Line_Options
>>>
>>>  However, the first part is much easier with grep or sed. To remove
>>> all solvent molecules:
>>>
>>>  grep -v "^ATOM.*SOL" in.pdb > out.pdb
>>>
>>>  To remove NA+/CL- too
>>>
>>>  grep -v "ATOM.*\(SOL\|NA+\|CL-\)" in.pdb > out.pdb
>>>
>>>  The fitting is a bit more cumbersome :)
>>>
>>>  Hope it helps,
>>>
>>>  Tsjerk
>>>
>>>
>>>  On Thu, Sep 4, 2014 at 10:19 AM, James Starlight <
>>> jmsstarli...@gmail.com> wrote:
>>>
 Dear PyMol users!

  I'd like to find possibilities for running o

Re: [PyMOL] Access to pymol commands from the terminal

2014-09-04 Thread Matthew Baumgartner

Use the -h flag with grep to suppress the filename.
Also, you don't need to pipe to cat, you can write directly to the file.

grep -h  '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb   > merged.pdb


On 09/04/2014 10:38 AM, James Starlight wrote:

..and one question about grep (really didn't find it in the tutorial)

using
grep '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb |cat   > merged.pdb

I've obtained good pdb BUT each line prior to the ATOM the name of the 
pdb of the previous files have been added eg:


tarr_se.pdb:ATOM  1  N   ASP X   1  35.722 8.306  92.256  
0.00  0.00   N
tarr_se.pdb:ATOM  2  CA  ASP X   1  35.252 8.836  93.529  
0.00  0.00   C
tarr_se.pdb:ATOM  3  C   ASP X   1  35.797 10.339  93.708  
0.00  0.00   C
tarr_se.pdb:ATOM  4  O   ASP X   1  34.979 11.297  93.674  
0.00  0.00   O
tarr_se.pdb:ATOM  5  CB  ASP X   1  35.593 7.984  94.698  
0.00  0.00   C
tarr_se.pdb:ATOM  6  CG  ASP X   1  34.692 8.171  95.960  
0.00  0.00   C
tarr_se.pdb:ATOM  7  OD1 ASP X   1  33.481 8.453  95.823  
0.00  0.00   O
tarr_se.pdb:ATOM  8  OD2 ASP X   1  35.257 8.362  97.046  
0.00  0.00   O1-
tarr_se.pdb:ATOM  9  HA  ASP X   1  34.180 9.033  93.580  
0.00  0.00   H
tarr_se.pdb:ATOM 10  HB2 ASP X   1  35.496 6.916  94.504  
0.00  0.00   H
tarr_se.pdb:ATOM 11  HB3 ASP X   1  36.648 7.969  94.970  
0.00  0.00   H


such pattern are always produced by grep
so I'd like that tarr_se.pdb: have not been included (of course I can 
it remove easily after merging but this step is not good for me :) )


Also i'll be very thankful for any useful grep awk sed tutorial in 
case of the bioinformatics application


James


2014-09-04 16:03 GMT+02:00 James Starlight >:


one question :)

could someone explain me the ussage the pymol commands from the
shell on the example
e.g i need to load 2 pdbs in pymol make its superimposition and
than save one of the superimposed pdb
like
load ref.pdb tar.pdb
super tar, ref
save tar > tar_superimposed.pdb

I've tried to do part of this using
pymol ref.pdb tarr.pdb -cd "super tarr ref"

but eventually obtained error

James


2014-09-04 15:47 GMT+02:00 James Starlight mailto:jmsstarli...@gmail.com>>:

Thanks Guys!
I'll check the tutorials.

All the best,

James


2014-09-04 13:15 GMT+02:00 David Hall mailto:li...@cowsandmilk.net>>:

(sed '1d' protein.pdb; sed '1d' lipid.pdb) > merged.pdb

--or--

tail -q -n '+2' protein.pdb lipid.pdb > merged.pdb

-David




On Thu, Sep 4, 2014 at 6:19 AM, James Starlight
mailto:jmsstarli...@gmail.com>>
wrote:

Hi Tsjerk,

Thanks alot!
Also I have the task to merge protein.pdb and
lipids.pdb with some 1 line shell command ( like CAT)
to obtain protein inserted in the lipids (the seccond
file is consist of the whole which can locate the
protein). My problem is that both protein.pdb and
lipids.pdb consisted of the unusuall first line which
should be deleated before it merging (in my case it's
the HEADER lala.pdb). could you suggest me the
combination of grep sed command which should be used
to deleate the first line from both pdbs and than
merge it in one-command method?

Many thanks,

James


2014-09-04 12:48 GMT+04:00 Tsjerk Wassenaar
mailto:tsje...@gmail.com>>:

Hi James,

You can use pymol -cd "pymolcommands". See
http://www.pymolwiki.org/index.php/Command_Line_Options

However, the first part is much easier with grep
or sed. To remove all solvent molecules:

grep -v "^ATOM.*SOL" in.pdb > out.pdb

To remove NA+/CL- too

grep -v "ATOM.*\(SOL\|NA+\|CL-\)" in.pdb > out.pdb

The fitting is a bit more cumbersome :)

Hope it helps,

Tsjerk


On Thu, Sep 4, 2014 at 10:19 AM, James Starlight
mailto:jmsstarli...@gmail.com>> wrote:

Dear PyMol users!

I'd like to find possibilities for running of
some pymol commands from the terminal. For
instance in my case I' d like perform 2 simple
steps (both in terminal not in the pymol GUI)
to remove water and ions from my target input
pdb (typical I d

Re: [PyMOL] Access to pymol commands from the terminal

2014-09-04 Thread James Starlight
..and one question about grep (really didn't find it in the tutorial)

using
grep '^\(ATOM\|HETATM\|END\)' tarr_se.pdb lipids.pdb |cat   > merged.pdb

I've obtained good pdb BUT each line prior to the ATOM the name of the pdb
of the previous files have been added eg:

tarr_se.pdb:ATOM  1  N   ASP X   1  35.722   8.306  92.256  0.00
0.00   N
tarr_se.pdb:ATOM  2  CA  ASP X   1  35.252   8.836  93.529  0.00
0.00   C
tarr_se.pdb:ATOM  3  C   ASP X   1  35.797  10.339  93.708  0.00
0.00   C
tarr_se.pdb:ATOM  4  O   ASP X   1  34.979  11.297  93.674  0.00
0.00   O
tarr_se.pdb:ATOM  5  CB  ASP X   1  35.593   7.984  94.698  0.00
0.00   C
tarr_se.pdb:ATOM  6  CG  ASP X   1  34.692   8.171  95.960  0.00
0.00   C
tarr_se.pdb:ATOM  7  OD1 ASP X   1  33.481   8.453  95.823  0.00
0.00   O
tarr_se.pdb:ATOM  8  OD2 ASP X   1  35.257   8.362  97.046  0.00
0.00   O1-
tarr_se.pdb:ATOM  9  HA  ASP X   1  34.180   9.033  93.580  0.00
0.00   H
tarr_se.pdb:ATOM 10  HB2 ASP X   1  35.496   6.916  94.504  0.00
0.00   H
tarr_se.pdb:ATOM 11  HB3 ASP X   1  36.648   7.969  94.970  0.00
0.00   H

such pattern are always produced by grep
so I'd like that tarr_se.pdb: have not been included (of course I can it
remove easily after merging but this step is not good for me :) )

Also i'll be very thankful for any useful grep awk sed tutorial in case of
the bioinformatics application

James


2014-09-04 16:03 GMT+02:00 James Starlight :

> one question :)
>
> could someone explain me the ussage the pymol commands from the shell on
> the example
> e.g i need to load 2 pdbs in pymol make its superimposition and than save
> one of the superimposed pdb
> like
> load ref.pdb tar.pdb
> super tar, ref
> save tar > tar_superimposed.pdb
>
> I've tried to do part of this using
> pymol ref.pdb tarr.pdb -cd "super tarr ref"
>
> but eventually obtained error
>
> James
>
>
> 2014-09-04 15:47 GMT+02:00 James Starlight :
>
> Thanks Guys!
>> I'll check the tutorials.
>>
>> All the best,
>>
>> James
>>
>>
>> 2014-09-04 13:15 GMT+02:00 David Hall :
>>
>>  (sed '1d' protein.pdb; sed '1d' lipid.pdb) > merged.pdb
>>>
>>> --or--
>>>
>>> tail -q -n '+2' protein.pdb lipid.pdb > merged.pdb
>>>
>>> -David
>>>
>>>
>>>
>>>
>>> On Thu, Sep 4, 2014 at 6:19 AM, James Starlight 
>>> wrote:
>>>
 Hi Tsjerk,

 Thanks alot!
 Also I have the task to merge protein.pdb and lipids.pdb with some 1
 line shell command ( like CAT) to obtain protein inserted in the lipids
 (the seccond file is consist of the whole which can locate the protein). My
 problem is that both protein.pdb and lipids.pdb consisted of the
 unusuall first line which should be deleated before it merging (in my case
 it's the HEADER lala.pdb). could you suggest me the combination of grep sed
 command which should be used to deleate the first line from both pdbs and
 than merge it in one-command method?

 Many thanks,

 James


 2014-09-04 12:48 GMT+04:00 Tsjerk Wassenaar :

 Hi James,
>
> You can use pymol -cd "pymolcommands". See
> http://www.pymolwiki.org/index.php/Command_Line_Options
>
> However, the first part is much easier with grep or sed. To remove all
> solvent molecules:
>
> grep -v "^ATOM.*SOL" in.pdb > out.pdb
>
> To remove NA+/CL- too
>
> grep -v "ATOM.*\(SOL\|NA+\|CL-\)" in.pdb > out.pdb
>
> The fitting is a bit more cumbersome :)
>
> Hope it helps,
>
> Tsjerk
>
>
> On Thu, Sep 4, 2014 at 10:19 AM, James Starlight <
> jmsstarli...@gmail.com> wrote:
>
>> Dear PyMol users!
>>
>> I'd like to find possibilities for running of some pymol commands
>> from the terminal. For instance in my case I' d like perform 2 simple 
>> steps
>> (both in terminal not in the pymol GUI)
>> to remove water and ions from my target input pdb (typical I do it
>> via gromacs editconf)
>> superimpose target.pdb against reference.pdb ( i do it by means of
>> tmalign utility)
>>
>> Thanks for help,
>>
>> 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
>>
>
>
>
> --
> Tsjerk A. Wassenaar, Ph.D.
>
>


 --
 Slashdot TV.
 Video for Nerds.  Stuff that matters.
 http://tv.slashd

Re: [PyMOL] Access to pymol commands from the terminal

2014-09-04 Thread James Starlight
one question :)

could someone explain me the ussage the pymol commands from the shell on
the example
e.g i need to load 2 pdbs in pymol make its superimposition and than save
one of the superimposed pdb
like
load ref.pdb tar.pdb
super tar, ref
save tar > tar_superimposed.pdb

I've tried to do part of this using
pymol ref.pdb tarr.pdb -cd "super tarr ref"

but eventually obtained error

James


2014-09-04 15:47 GMT+02:00 James Starlight :

> Thanks Guys!
> I'll check the tutorials.
>
> All the best,
>
> James
>
>
> 2014-09-04 13:15 GMT+02:00 David Hall :
>
>  (sed '1d' protein.pdb; sed '1d' lipid.pdb) > merged.pdb
>>
>> --or--
>>
>> tail -q -n '+2' protein.pdb lipid.pdb > merged.pdb
>>
>> -David
>>
>>
>>
>>
>> On Thu, Sep 4, 2014 at 6:19 AM, James Starlight 
>> wrote:
>>
>>> Hi Tsjerk,
>>>
>>> Thanks alot!
>>> Also I have the task to merge protein.pdb and lipids.pdb with some 1
>>> line shell command ( like CAT) to obtain protein inserted in the lipids
>>> (the seccond file is consist of the whole which can locate the protein). My
>>> problem is that both protein.pdb and lipids.pdb consisted of the
>>> unusuall first line which should be deleated before it merging (in my case
>>> it's the HEADER lala.pdb). could you suggest me the combination of grep sed
>>> command which should be used to deleate the first line from both pdbs and
>>> than merge it in one-command method?
>>>
>>> Many thanks,
>>>
>>> James
>>>
>>>
>>> 2014-09-04 12:48 GMT+04:00 Tsjerk Wassenaar :
>>>
>>> Hi James,

 You can use pymol -cd "pymolcommands". See
 http://www.pymolwiki.org/index.php/Command_Line_Options

 However, the first part is much easier with grep or sed. To remove all
 solvent molecules:

 grep -v "^ATOM.*SOL" in.pdb > out.pdb

 To remove NA+/CL- too

 grep -v "ATOM.*\(SOL\|NA+\|CL-\)" in.pdb > out.pdb

 The fitting is a bit more cumbersome :)

 Hope it helps,

 Tsjerk


 On Thu, Sep 4, 2014 at 10:19 AM, James Starlight <
 jmsstarli...@gmail.com> wrote:

> Dear PyMol users!
>
> I'd like to find possibilities for running of some pymol commands from
> the terminal. For instance in my case I' d like perform 2 simple steps
> (both in terminal not in the pymol GUI)
> to remove water and ions from my target input pdb (typical I do it via
> gromacs editconf)
> superimpose target.pdb against reference.pdb ( i do it by means of
> tmalign utility)
>
> Thanks for help,
>
> 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
>



 --
 Tsjerk A. Wassenaar, Ph.D.


>>>
>>>
>>> --
>>> 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

Re: [PyMOL] Access to pymol commands from the terminal

2014-09-04 Thread David Hall
(sed '1d' protein.pdb; sed '1d' lipid.pdb) > merged.pdb

--or--

tail -q -n '+2' protein.pdb lipid.pdb > merged.pdb

-David




On Thu, Sep 4, 2014 at 6:19 AM, James Starlight 
wrote:

> Hi Tsjerk,
>
> Thanks alot!
> Also I have the task to merge protein.pdb and lipids.pdb with some 1 line
> shell command ( like CAT) to obtain protein inserted in the lipids (the
> seccond file is consist of the whole which can locate the protein). My
> problem is that both protein.pdb and lipids.pdb consisted of the unusuall
> first line which should be deleated before it merging (in my case it's the
> HEADER lala.pdb). could you suggest me the combination of grep sed command
> which should be used to deleate the first line from both pdbs and than
> merge it in one-command method?
>
> Many thanks,
>
> James
>
>
> 2014-09-04 12:48 GMT+04:00 Tsjerk Wassenaar :
>
> Hi James,
>>
>> You can use pymol -cd "pymolcommands". See
>> http://www.pymolwiki.org/index.php/Command_Line_Options
>>
>> However, the first part is much easier with grep or sed. To remove all
>> solvent molecules:
>>
>> grep -v "^ATOM.*SOL" in.pdb > out.pdb
>>
>> To remove NA+/CL- too
>>
>> grep -v "ATOM.*\(SOL\|NA+\|CL-\)" in.pdb > out.pdb
>>
>> The fitting is a bit more cumbersome :)
>>
>> Hope it helps,
>>
>> Tsjerk
>>
>>
>> On Thu, Sep 4, 2014 at 10:19 AM, James Starlight 
>> wrote:
>>
>>> Dear PyMol users!
>>>
>>> I'd like to find possibilities for running of some pymol commands from
>>> the terminal. For instance in my case I' d like perform 2 simple steps
>>> (both in terminal not in the pymol GUI)
>>> to remove water and ions from my target input pdb (typical I do it via
>>> gromacs editconf)
>>> superimpose target.pdb against reference.pdb ( i do it by means of
>>> tmalign utility)
>>>
>>> Thanks for help,
>>>
>>> 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
>>>
>>
>>
>>
>> --
>> Tsjerk A. Wassenaar, Ph.D.
>>
>>
>
>
> --
> 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

Re: [PyMOL] Access to pymol commands from the terminal

2014-09-04 Thread Tsjerk Wassenaar
Hi James,

grep '^\(ATOM\|HETATM\|CRYST1\)' protein.pdb lipid.pdb > merged.pdb

Oh, the joy one has from reading a sed/grep/awk tutorial :)

Cheers,

Tsjerk



On Thu, Sep 4, 2014 at 12:19 PM, James Starlight 
wrote:

> Hi Tsjerk,
>
> Thanks alot!
> Also I have the task to merge protein.pdb and lipids.pdb with some 1 line
> shell command ( like CAT) to obtain protein inserted in the lipids (the
> seccond file is consist of the whole which can locate the protein). My
> problem is that both protein.pdb and lipids.pdb consisted of the unusuall
> first line which should be deleated before it merging (in my case it's the
> HEADER lala.pdb). could you suggest me the combination of grep sed command
> which should be used to deleate the first line from both pdbs and than
> merge it in one-command method?
>
> Many thanks,
>
> James
>
>
> 2014-09-04 12:48 GMT+04:00 Tsjerk Wassenaar :
>
> Hi James,
>>
>> You can use pymol -cd "pymolcommands". See
>> http://www.pymolwiki.org/index.php/Command_Line_Options
>>
>> However, the first part is much easier with grep or sed. To remove all
>> solvent molecules:
>>
>> grep -v "^ATOM.*SOL" in.pdb > out.pdb
>>
>> To remove NA+/CL- too
>>
>> grep -v "ATOM.*\(SOL\|NA+\|CL-\)" in.pdb > out.pdb
>>
>> The fitting is a bit more cumbersome :)
>>
>> Hope it helps,
>>
>> Tsjerk
>>
>>
>> On Thu, Sep 4, 2014 at 10:19 AM, James Starlight 
>> wrote:
>>
>>> Dear PyMol users!
>>>
>>> I'd like to find possibilities for running of some pymol commands from
>>> the terminal. For instance in my case I' d like perform 2 simple steps
>>> (both in terminal not in the pymol GUI)
>>> to remove water and ions from my target input pdb (typical I do it via
>>> gromacs editconf)
>>> superimpose target.pdb against reference.pdb ( i do it by means of
>>> tmalign utility)
>>>
>>> Thanks for help,
>>>
>>> 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
>>>
>>
>>
>>
>> --
>> Tsjerk A. Wassenaar, Ph.D.
>>
>>
>


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

Re: [PyMOL] Access to pymol commands from the terminal

2014-09-04 Thread James Starlight
Hi Tsjerk,

Thanks alot!
Also I have the task to merge protein.pdb and lipids.pdb with some 1 line
shell command ( like CAT) to obtain protein inserted in the lipids (the
seccond file is consist of the whole which can locate the protein). My
problem is that both protein.pdb and lipids.pdb consisted of the unusuall
first line which should be deleated before it merging (in my case it's the
HEADER lala.pdb). could you suggest me the combination of grep sed command
which should be used to deleate the first line from both pdbs and than
merge it in one-command method?

Many thanks,

James


2014-09-04 12:48 GMT+04:00 Tsjerk Wassenaar :

> Hi James,
>
> You can use pymol -cd "pymolcommands". See
> http://www.pymolwiki.org/index.php/Command_Line_Options
>
> However, the first part is much easier with grep or sed. To remove all
> solvent molecules:
>
> grep -v "^ATOM.*SOL" in.pdb > out.pdb
>
> To remove NA+/CL- too
>
> grep -v "ATOM.*\(SOL\|NA+\|CL-\)" in.pdb > out.pdb
>
> The fitting is a bit more cumbersome :)
>
> Hope it helps,
>
> Tsjerk
>
>
> On Thu, Sep 4, 2014 at 10:19 AM, James Starlight 
> wrote:
>
>> Dear PyMol users!
>>
>> I'd like to find possibilities for running of some pymol commands from
>> the terminal. For instance in my case I' d like perform 2 simple steps
>> (both in terminal not in the pymol GUI)
>> to remove water and ions from my target input pdb (typical I do it via
>> gromacs editconf)
>> superimpose target.pdb against reference.pdb ( i do it by means of
>> tmalign utility)
>>
>> Thanks for help,
>>
>> 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
>>
>
>
>
> --
> Tsjerk A. Wassenaar, Ph.D.
>
>
--
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

Re: [PyMOL] Access to pymol commands from the terminal

2014-09-04 Thread Tsjerk Wassenaar
Hi James,

You can use pymol -cd "pymolcommands". See
http://www.pymolwiki.org/index.php/Command_Line_Options

However, the first part is much easier with grep or sed. To remove all
solvent molecules:

grep -v "^ATOM.*SOL" in.pdb > out.pdb

To remove NA+/CL- too

grep -v "ATOM.*\(SOL\|NA+\|CL-\)" in.pdb > out.pdb

The fitting is a bit more cumbersome :)

Hope it helps,

Tsjerk


On Thu, Sep 4, 2014 at 10:19 AM, James Starlight 
wrote:

> Dear PyMol users!
>
> I'd like to find possibilities for running of some pymol commands from the
> terminal. For instance in my case I' d like perform 2 simple steps (both in
> terminal not in the pymol GUI)
> to remove water and ions from my target input pdb (typical I do it via
> gromacs editconf)
> superimpose target.pdb against reference.pdb ( i do it by means of tmalign
> utility)
>
> Thanks for help,
>
> 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
>



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

[PyMOL] Access to pymol commands from the terminal

2014-09-04 Thread James Starlight
Dear PyMol users!

I'd like to find possibilities for running of some pymol commands from the
terminal. For instance in my case I' d like perform 2 simple steps (both in
terminal not in the pymol GUI)
to remove water and ions from my target input pdb (typical I do it via
gromacs editconf)
superimpose target.pdb against reference.pdb ( i do it by means of tmalign
utility)

Thanks for help,

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