Yes thanks it works!

Now assuming that I want to make alitle complicated script based on
that template.

Assuming that I have 3 pdbs used as references defined in variables
ref1, ref2,ref3

now I need loop all of my pdbs from the array and superimpose each pdb
from the array agains each of reference pdb and then based on RMSD
value produced from pymol output chose only best superimposed
structure from 3 possibilities
Based on that selection I can make conclusion  that for pdb1 the ref1
is best template because of the similar fold, for pdb2 is the ref2 is
best etc...




# Set pdb array
pdb_array=("1f88" "2rh1" "3pbs" "3eml" "4LGJ" "5A2H")
pdb_array_store=$template/pymol

# Set references
ref1="${pdb_array_store}/ref/ref_gpcr.pdb"
ref1_filename=$(basename "$ref1")
R1=${ref1_filename/.pdb/}

ref2="${pdb_array_store}/ref/ref_wsp.pdb"
ref2_filename=$(basename "$ref2")
R2=${ref2_filename/.pdb/}

ref3="${pdb_array_store}/ref/ref_xz.pdb"
ref3_filename=$(basename "$ref3")
R3=${ref3_filename/.pdb/}

Here the realization of that for only 1 reference:

# download pdbs to the folder and superimpose them agains ref1!
for i in ${pdb_array[@]}; do
pdb_tit=$(basename "$i")
pymol ${ref1} -d "cd ${pdb_array_store}/tmp; fetch ${i}, async=0;
remove ${i} and not chain A; super ${i}, ${R1}; save
${pdb_array_store}/${pdb_tit}_superimposed.pdb, ${pdb_tit} and
polymer;" -c  #> ${pdb_array_store}/tmp/${pdb_tit}_pymol.log
done



now I can just define ref2 ref3 and add two additional pymol strings
within the for loop to superimpose step-by-stem each pdbs from the
${pdb_array}  agains, ref2 and ref3 in addition.
 but how to select the best superimposed structure as the outcome of
each for loop run ? In other words I need only to save
${pdb_tit}_superimposed.pdb with the lowest RMSD value assuming that
the operation was repeated 3 times for 3 different refs.

Thanks for help!

J,

2016-04-28 15:48 GMT+02:00 David Hall <li...@cowsandmilk.net>:
> You need to add “,async=0” to your fetch calls.
>
> http://pymolwiki.org/index.php/Fetch
>
>
>
>> On Apr 28, 2016, at 4:51 AM, James Starlight <jmsstarli...@gmail.com> wrote:
>>
>> Hi,
>>
>> My script is
>>
>> pdb_array=("1UBI" "1IGD" "1G33" "1CC7" "4LGJ" "5A2H")
>> pdb_array_store=$template/pymol
>>
>>
>> # A simple FETCHER via PYMOL: download pdbs to the folder and pre-process 
>> them!
>> mkdir ${pdb_array_store}
>> for i in ${pdb_array[@]}; do
>> pdb_tit=$(basename "$i")
>> pymol -d "fetch $i; save ${pdb_array_store}/${pdb_tit}_proc.pdb,
>> ${pdb_tit}" -c ;
>> rm ${pdb_array_store}/*.log
>> done
>>
>>
>> while executing it sends error
>>
>> PyMOL>fetch 5A2H; save
>> /projects/clouddyn/md_bench/script_amber/inputs/pymol/5A2H_proc.pdb,
>> 5A2H
>> please wait ...
>> Selector-Error: Invalid selection name "5A2H".
>> ( 5A2H )<--
>> Save: wrote 
>> "/projects/clouddyn/md_bench/script_amber/inputs/pymol/5A2H_proc.pdb".
>> PyMOL: normal program termination.
>>
>> if I change save selection just to 'polymer' it saved empty pdbs-
>> where might be an error here?
>>
>> Thanks!
>>
>> 2016-04-27 16:53 GMT+02:00 Tsjerk Wassenaar <tsje...@gmail.com>:
>>> Hi,
>>>
>>> You need
>>>
>>> for i in ${pdb_array[@]}
>>> do
>>> ...
>>> done
>>>
>>> Cheers,
>>>
>>> Tsjerk
>>>
>>> On Apr 27, 2016 4:44 PM, "James Starlight" <jmsstarli...@gmail.com> wrote:
>>>>
>>>> so As I tried to do it but it was not worked :-O)
>>>>
>>>> #pdbs list
>>>> pdb_array=("1UBI" "1IGD" "1G33" "1CC7" "4LGJ" "5A2H")
>>>> #where to save
>>>> pdb_array_store=$template/pymol/
>>>>
>>>>
>>>> # A simple FETCHER: download pdbs to the folder and pre-process them!
>>>> #mkdir ${pdb_array_store}
>>>> for i in `cat ${pdb_array}` ; do wget
>>>> http://www.rcsb.org/pdb/files/${i}.pdb ${pdb_array_store}/${i}.pdb ;
>>>> done
>>>>
>>>> result
>>>> cat: 1UBI: No such file or directory
>>>>
>>>> 2016-04-27 12:29 GMT+02:00 James Starlight <jmsstarli...@gmail.com>:
>>>>> Please give me an example of the list of 3 pdbs instead of just cat $1
>>>>> :)
>>>>> as well as proper syntax of how to save each pdb after fetching in
>>>>> pymol using same command line
>>>>> Forgot to mention important points:
>>>>> 1) that list should be physically in my script like in python
>>>>> 2) I use pymol because I will need to process each of the pdb- e,g to
>>>>> remove from them ligands or water etc
>>>>>
>>>>> Thanks!
>>>>>
>>>>> 2016-04-27 12:18 GMT+02:00 James Starlight <jmsstarli...@gmail.com>:
>>>>>> Please give me an example of the list of 3 pdbs instead of cat $1  as
>>>>>> well as how to save syntax of how to save each pdb
>>>>>>
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> J
>>>>>>
>>>>>> 2016-04-27 12:09 GMT+02:00 Jordan Willis <jwillis0...@gmail.com>:
>>>>>>> If you really want to use pymol, this works
>>>>>>>
>>>>>>> #!/bin/bash
>>>>>>> #myscript.bash
>>>>>>> for i in `cat $1` ; do pymol -d "fetch $i" -c ; done
>>>>>>>
>>>>>>>
>>>>>>> Then on the command line
>>>>>>>> chmod +x myscript.bash; ./myscript.bash mylist.txt
>>>>>>>
>>>>>>>
>>>>>>> On Apr 27, 2016, at 2:55 AM, Jordan Willis <jwillis0...@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>> Must you use pymol?
>>>>>>>
>>>>>>>
>>>>>>> Try directly from the PDB
>>>>>>>
>>>>>>> #!/bin/bash
>>>>>>> #myscript.bash
>>>>>>>
>>>>>>> for i in `cat $1` ; do wget http://www.rcsb.org/pdb/files/${i}.pdb ;
>>>>>>> done
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Then on the command line
>>>>>>>> chmod +x myscript.bash; ./myscript.bash mylist.txt
>>>>>>>
>>>>>>>
>>>>>>> J
>>>>>>>
>>>>>>> On Apr 27, 2016, at 2:41 AM, James Starlight <jmsstarli...@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>> Dear Pymol users!
>>>>>>>
>>>>>>> I need to add a few strings to my simple bash script which will creat
>>>>>>> a list of pdb files and than will call pymol without GUI from the
>>>>>>> terminal to fetch all the pdbs and save it to the desired location.
>>>>>>> For one pdb it should be smth like
>>>>>>>
>>>>>>> pdbs="1f88"
>>>>>>>
>>>>>>> pymol -c -q -d "fetch ${pdbs}; save $template/pymol/*.pdb " >
>>>>>>> ${tmp}/pymol_${pdbs}.log
>>>>>>>
>>>>>>> will be thankful for the correction of this string as well as example
>>>>>>> how it can be adapted for a list of pdbs in bash.
>>>>>>>
>>>>>>> Thanks!
>>>>>>>
>>>>>>> J
>>>>>>>
>>>>>>>
>>>>>>> ------------------------------------------------------------------------------
>>>>>>> Find and fix application performance issues faster with Applications
>>>>>>> Manager
>>>>>>> Applications Manager provides deep performance insights into multiple
>>>>>>> tiers
>>>>>>> of
>>>>>>> your business applications. It resolves application problems quickly
>>>>>>> and
>>>>>>> reduces your MTTR. Get your free trial!
>>>>>>> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>>>>>>> _______________________________________________
>>>>>>> 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
>>>>>>>
>>>>>>>
>>>>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Find and fix application performance issues faster with Applications
>>>> Manager
>>>> Applications Manager provides deep performance insights into multiple
>>>> tiers of
>>>> your business applications. It resolves application problems quickly and
>>>> reduces your MTTR. Get your free trial!
>>>> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>>>> _______________________________________________
>>>> 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
>>
>> ------------------------------------------------------------------------------
>> Find and fix application performance issues faster with Applications Manager
>> Applications Manager provides deep performance insights into multiple tiers 
>> of
>> your business applications. It resolves application problems quickly and
>> reduces your MTTR. Get your free trial!
>> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>> _______________________________________________
>> 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
>

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Reply via email to