Bash script for making complexes of ligands and receptor


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Bash script for making complexes of ligands and receptor
# 1  
Old 01-18-2015
Bash script for making complexes of ligands and receptor

I am working with autodock vina for virtual screening and docking with cygwin. Autodock vina generates conformers for multiple ligands. I want to make the complex of these conformers with receptor. e.g. I have 100 .pdbqt files form vina output and one receptor pdbqt file. By running command-

Code:
cut -c-66 inh*.pdbqt > inh*.pdb

I can convert inh*.pdbqt to pdb, but I have to do this individually for all ligands (* here are random numbers from pubchem database).

With command-

Code:
cat Receptor.pdbqt  inh*.pdb | grep -v '^END ' | grep -v '^END$' > complex.pdb

With this command the pdb of complex of receptor and ligand is generated, but again this I have to do for each ligand, receptor file is fixed in this case.

I want a bash script for above to commands to run in cygwin. Aim is to use multiple ligand files - convert them to pdb - merge with receptor.pdbqt - generate multiple complexes as per ligand names.

This may need a simple script. Though I have worked with many scripts I don't know how to write such bash scripts. Naively, I have given a try and wrote one script-

Code:
#!/bin/bash
for f in inh*.pdbqt; do b=`basename $f .pdbqt`;

$b; mkdir -p data02; cut -c-66 inh*.pdbqt > inh*.pdb;

cat 3V3VN.pdbqt inh*.pdb | grep -v '^END' | grep -v '^END$' > complex*.pdb;

$f --out data02/$f.pdbqt --log data02/$f.txt; done

It generates the complex but only one complex with all ligands in it !!! SmilieSmilieSmilie

Last edited by Scrutinizer; 01-18-2015 at 04:05 AM.. Reason: code tags
# 2  
Old 01-18-2015
I'm afraid I can't deal with receptors nor ligands. How about posting the input files and desired output?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Making bash script allways executable when transfer ?

Does it possible to make some bash script automatic to be a executable when transfered to another pc...? (5 Replies)
Discussion started by: tomislav91
5 Replies

2. Shell Programming and Scripting

Help in making a basic bash script

Hi All, I am trying to monitor CPU load of few processes, with the same name. The output that I get from top is the following 28171 root 20 0 1089m 21m 3608 S 103 0.3 15:16.89 /opt/ppp//h264rtptranscoder.bin --videoPort=14504 --audioPort=14505 27589 root 20 0 1060m 23m... (3 Replies)
Discussion started by: liviusbr
3 Replies

3. Shell Programming and Scripting

Making a bash script and small C program for a homework assignment

Here's the assignment. I'll bold the parts that are rough for me. Unfortunately, that's quite a bit lol. The syntax is, of course, where my issues lie, for the most part. I don't have a lot of programming experience at all :/. I'd post what I've already done, but I'm so lost I really don't know... (1 Reply)
Discussion started by: twk101
1 Replies

4. Shell Programming and Scripting

Help making simple perl or bash script to create a simple matrix

Hello all! This is my first post and I'm very new to programming. I would like help creating a simple perl or bash script that I will be using in my work as a junior bioinformatician. Essentially, I would like to take a tab-delimted or .csv text with 3 columns and write them to a "3D" matrix: ... (16 Replies)
Discussion started by: torchij
16 Replies

5. Shell Programming and Scripting

bash: making a count

ok basically im trying to count how many people fail a class by comparing there grade by -gt 49 i tried putting a count inside the while loop but i know you cant access a count outside a subshell. is there an easy way to count the number of failures? declare -i failcount=0 awk... (2 Replies)
Discussion started by: nilekyle
2 Replies

6. Shell Programming and Scripting

making code compatible to previous bash versions

First let me explain the scenario I have tywo files as usual file1.txt (it has n rows and 8 columns) $1 $2 $3 $4 $5 $6 $7 $8 Code: 1234567|iufgt|iuoy|iout|white |black |red |90879 1234567|iufgt|iuoy|iout|green |pink |blue |90879... (3 Replies)
Discussion started by: s.deepak
3 Replies

7. Shell Programming and Scripting

Making array of string with bash

in.txt libgstreamer gstreamer-0_10 gstreamer-0_10-plugins-good gstreamer-0_10-plugins-base Output should be: libgstreamer gstreamer-0_10 gstreamer-0_10-plugins-good gstreamer0_10-plugins-base Then: #!/bin/sh v=(libgstreamer gstreamer-0_10 gstreamer-0_10-plugins-good... (5 Replies)
Discussion started by: cola
5 Replies

8. Shell Programming and Scripting

making a list matching certain criteria in bash...

Hello everyone!I am trying to make a mail list(a simple .txt file)in which i put certain records that match specific criteria. Let's say that i have a(sorted by last column file)like this one: 0100567 Bla1 Lala1 100 1234567 Bla2 Lala2 80 8769029 Bla3 Lala3 70 1001007 ... (0 Replies)
Discussion started by: bashuser2
0 Replies

9. Shell Programming and Scripting

Making a progress gauge in a bash script

Hello once again: One thing that seems to be a nice feature is a progress gauge... so I can see how long an operation will take for a task to complete if it is requiring a lot of processing or the file is enormous. I have seen references to gauge operations, but I don't know anything about it or... (1 Reply)
Discussion started by: ccox85
1 Replies

10. UNIX for Dummies Questions & Answers

Making Application by bash

I'm using Mac OSX. And i want to make an visual application based on bash command. But, apple script doesn't support Terminal command. So please tell me how to turn my dream into a reality. :o I mean purely by bash! (0 Replies)
Discussion started by: Euler04
0 Replies
Login or Register to Ask a Question