some additional question about shell scripting (copied from the amber forum
because I'd like to find as more sollutions of this problem as possible):


I wounder about possibilities to define disulphide bond between any pairs
of SG atoms of CYX residues using amber's tleap scripts in some automatic
fashion.

In my case I use tleap as part of some big script to process many
models.pdb for further md simulation. Each of the model consist of pair of
CYX residues (assigned by pdb2pqr) in different positions of its sequence.
So in script I need firstly to know the number of position for each of CYX
residues of each model and than to fill this numbers to the tleap input
files for each model

in bash for one model it will be look like:

#some command to scan the sequence of model.pdb and define pair of its CYX
residues within it as the k ans i variables
  printf "source leaprc.ff03.r1\nprotein = loadpdb model.pdb\nsetbox
protein centers\nbond protein.${k}.SG protein.${i}.SG\nsaveamberparm
protein protein.parm7 protein.inpcrd\nquit" > ./tleap.in


so my task is only to find some command which will scan model and find
positions of the CYX within its sequence which could be put to the tleap as
two digits. It will be better to find those 2 digits using pdb as an input
and some unix command like sed or grep to find positions

I will be very thankful for any suggestions!

James



2014-09-12 16:21 GMT+02:00 Tsjerk Wassenaar <tsje...@gmail.com>:

>
> csplit -b "%03d.pdb" test.pdbqt /^MODEL/ {0} > somelog.log
>>
>
> man csplit:
>
> csplit -f blabla -b "%03d.pdb" test.pdbqt /^MODEL/ {1}
>
> But you want only the first frame anyway, so no real use for csplit...
>
> sed /^ENDMDL/q my_docking.pdb | grep -v "^ROOT\|^ENDROOT\|^TORSDOF
>> 0\|^MODEL\|^REMARK" |  sed -e 's/^ENDMDL/TER/g' > firstmodel.pdb
>>
>
> sed -e '/^ENDMDL/{s/^.*/TER/;q;}' -e '/^\(ROOT\|ENDROOT\|TORSDOF
> 0\|MODEL\|REMARK\)/d' my_docking.pdb > firstmodel.pdb
>
> ... shorter and one process running in stead of 3.
>
> Cheers,
>
> Tsjerk
>
> --
> Tsjerk A. Wassenaar, Ph.D.
>
>
------------------------------------------------------------------------------
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

Reply via email to