# Calculating binding energy for Multiple PDBs

**URL:** <https://ask.bioexcel.eu/t/calculating-binding-energy-for-multiple-pdbs/1153>\
**Category:** PRODIGY\
**Created:** [September 3, 2018, 7:34am UTC](https://ask.bioexcel.eu/t/calculating-binding-energy-for-multiple-pdbs/1153 "2018-09-03T07:34:58Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![srinivasan](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@srinivasan](https://ask.bioexcel.eu/u/srinivasan)\
**Post date:** [September 3, 2018, 7:34am UTC](https://ask.bioexcel.eu/t/calculating-binding-energy-for-multiple-pdbs/1153/1 "2018-09-03T07:34:58Z")

</div>

Dear Sir/Madam,  
I would like to compute the binding free energy for multiple PDBs. How could I do it with your program. Please do help me out.

---

<div class="post-metadata">

**Author:** ![a.vangone](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@a.vangone](https://ask.bioexcel.eu/u/a.vangone)\
**Post date:** [September 3, 2018, 11:22am UTC](https://ask.bioexcel.eu/t/calculating-binding-energy-for-multiple-pdbs/1153/2 "2018-09-03T11:22:06Z")

</div>

Hi,

You just need to compress the directory containing all the files you want to analyse ans submit it. Please notice, through the server you can also do it with pdb structures that has the same chain identifiers, since it is only possible to provide this command once.

Best regards,  
Anna

---

<div class="post-metadata">

**Author:** ![srinivasan](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@srinivasan](https://ask.bioexcel.eu/u/srinivasan)\
**Post date:** [September 3, 2018, 12:06pm UTC](https://ask.bioexcel.eu/t/calculating-binding-energy-for-multiple-pdbs/1153/3 "2018-09-03T12:06:34Z")

</div>

Dear Anna,  
I tried submitting the ZIP file in the web server for the calculation and ended with the error stating “Error during parsing the input structure: File exceeds allowed size limit of 10 MB”. On the other hand, I also tried using the command line with the command python predict\_IC.py test.zip --selection A C

output error:  
[+] Reading structure file: /home/rajasekaran/Documents/prodigy-master/test.zip  
Traceback (most recent call last):  
File “predict\_IC.py”, line 284, in   
structure, n\_chains, n\_res = parse\_structure(struct\_path)  
File “/home/rajasekaran/Documents/prodigy-master/lib/parsers.py”, line 117, in parse\_structure  
raise IOError(’[!] Structure format ‘{0}’ is not supported. Use ‘.pdb’ or ‘.cif’.’.format(s\_ext))  
IOError: [!] Structure format ‘zip’ is not supported. Use ‘.pdb’ or ‘.cif’.

Please do help me out with the error.

with regards  
Srinivasan

---

<div class="post-metadata">

**Author:** ![J.Schaarschmidt](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@J.Schaarschmidt](https://ask.bioexcel.eu/u/J.Schaarschmidt)\
**Post date:** [September 3, 2018, 12:42pm UTC](https://ask.bioexcel.eu/t/calculating-binding-energy-for-multiple-pdbs/1153/4 "2018-09-03T12:42:04Z")

</div>

Hi,

we might increase the size limit of the server. For now you can try to split your PDB files into multiple archives smaller then 10 mb and submit several runs.  
For the command line you will have to call the script with a simple loop multiple times e.g in bash:  
`for pdb in *pdb; do python predict_IC.py $pdb --selection A C; done`

Regards,

Joerg

---

<div class="post-metadata">

**Author:** ![srinivasan](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@srinivasan](https://ask.bioexcel.eu/u/srinivasan)\
**Post date:** [September 3, 2018, 6:01pm UTC](https://ask.bioexcel.eu/t/calculating-binding-energy-for-multiple-pdbs/1153/5 "2018-09-03T18:01:55Z")

</div>

Thank you very much Anna.

with regards,  
Srinivasan

---

<div class="post-metadata">

**Author:** ![Shriyansh\_iitgn](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@Shriyansh\_iitgn](https://ask.bioexcel.eu/u/Shriyansh_iitgn)\
**Post date:** [May 11, 2024, 6:14am UTC](https://ask.bioexcel.eu/t/calculating-binding-energy-for-multiple-pdbs/1153/6 "2024-05-11T06:14:18Z")

</div>

Dear Anna and Srinivasan

I am facing trouble in calculating binding energy for multiple PDBs. I have 50 structures in a single PDB file. Although both webserver and locally installed version of Prodigy takes in the file without any error, it only produces output for the first structure. I tried to find a solution but sadly I could not. I would appreciate any suggestions you might have.

P.S. I need to run it on 200+ structure models and thus the need.

---

<div class="post-metadata">

**Author:** ![Shriyansh\_iitgn](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@Shriyansh\_iitgn](https://ask.bioexcel.eu/u/Shriyansh_iitgn)\
**Post date:** [May 11, 2024, 11:54am UTC](https://ask.bioexcel.eu/t/calculating-binding-energy-for-multiple-pdbs/1153/7 "2024-05-11T11:54:34Z")

</div>

Hi

I have been able to make a bash script for my use case. I am sharing it here, maybe useful for future.

`#!/bin/bash

# Define the Conda environment name

CONDA\_ENV=“prodigy”

# Define the command you want to run

COMMAND=“prodigy”

# Define the command arguments

COMMAND\_ARGS=“–temperature 27 --contact\_list --pymol\_selection --selection A E --q”

# Activate the Conda environment

source activate “$CONDA\_ENV”

# Define the output file

OUTPUT\_FILE=“output.txt”

# Remove existing output file if it exists

rm -f “$OUTPUT\_FILE”

# Start and end frame numbers

START\_FRAME=600  
END\_FRAME=1000  
FRAME\_INCREMENT=8

# Iterate over frames

for ((i=$START\_FRAME; i\<=$END\_FRAME; i+=FRAME\_INCREMENT)); do  
FILENAME=“CHEMBL2059573\_-_Frame_${i}.pdb” #change file name as required  
if [-f “$FILENAME”]; then # Check if the file exists  
echo “Running command on $FILENAME…”  
# Execute the command on the file and append output to the output file  
$COMMAND “$FILENAME” $COMMAND\_ARGS \>\> “$OUTPUT\_FILE” 2\>&1  
else  
echo “File $FILENAME not found.”  
fi  
done

# Deactivate the Conda environment

conda deactivate  
`

---

<div class="post-metadata">

**Author:** ![amjjbonvin](https://dub1.discourse-cdn.com/flex013/user_avatar/ask.bioexcel.eu/amjjbonvin/32/23_2.png) [@amjjbonvin](https://ask.bioexcel.eu/u/amjjbonvin)\
**Post date:** [May 13, 2024, 7:38am UTC](https://ask.bioexcel.eu/t/calculating-binding-energy-for-multiple-pdbs/1153/8 "2024-05-13T07:38:14Z")

</div>

Glad you solved it on your own! 🙂

---

<div class="post-metadata">

**Author:** ![amjjbonvin](https://dub1.discourse-cdn.com/flex013/user_avatar/ask.bioexcel.eu/amjjbonvin/32/23_2.png) [@amjjbonvin](https://ask.bioexcel.eu/u/amjjbonvin)\
**Post date:** [May 13, 2024, 7:39am UTC](https://ask.bioexcel.eu/t/calculating-binding-energy-for-multiple-pdbs/1153/9 "2024-05-13T07:39:27Z")

</div>

PS: Does your multimodel PDB file have the MODEL / ENDMDL statements? The server should in principle accept that.
