# Active-passive-to-ambig.py

**URL:** <https://ask.bioexcel.eu/t/active-passive-to-ambig-py/4318>\
**Category:** HADDOCK\
**Created:** [May 15, 2023, 5:31pm UTC](https://ask.bioexcel.eu/t/active-passive-to-ambig-py/4318 "2023-05-15T17:31:42Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![gaurav.sharmapsit](https://dub1.discourse-cdn.com/flex013/user_avatar/ask.bioexcel.eu/gaurav.sharmapsit/32/689_2.png) [@gaurav.sharmapsit](https://ask.bioexcel.eu/u/gaurav.sharmapsit)\
**Post date:** [May 15, 2023, 5:31pm UTC](https://ask.bioexcel.eu/t/active-passive-to-ambig-py/4318/1 "2023-05-15T17:31:42Z")

</div>

The HADDOCK category is meant to discuss any HADDOCK-related issue. For general information about HADDOCK refer to [HADDOCK – Bonvin Lab](http://www.bonvinlab.org/software/haddock2.4)  
Hello,

I am interested in conducting protein-DNA docking; however, don’t have any idea about the active site. Hence, the docking is conducted in two steps. Initially, I perform ab initio docking in order to identify the active site for protein DNA docking. Subsequently, I proceed with site-specific docking. After completing the first step, I encounter a question on how to determine the list of passive residues. I have already obtained the active residues list by identifying the interacting residues between the DNA and protein. However, I am uncertain about the process of finding the passive residues.

to generate the .tbl file I am using the following command  
active-passive-to-ambig.py e2a-act-pass.list hpr-act-pass.list \> e2a-hpr-ambig.tbl

However, how do I generate the passive residues list.

Thanks for your help,

---

<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 15, 2023, 7:17pm UTC](https://ask.bioexcel.eu/t/active-passive-to-ambig-py/4318/2 "2023-05-15T19:17:08Z")

</div>

If you have a well defined binding site in principle you don’t need per se passive residues.

But you can define them by taking the surface neighbours of your active residues.

In our haddock-tools GitHub repo we have a script that will do that for you (at least for the protein part): passive\_from\_active.py

[https://github.com/haddocking/haddock-tools](https://github.com/haddocking/haddock-tools)

---

<div class="post-metadata">

**Author:** ![gaurav.sharmapsit](https://dub1.discourse-cdn.com/flex013/user_avatar/ask.bioexcel.eu/gaurav.sharmapsit/32/689_2.png) [@gaurav.sharmapsit](https://ask.bioexcel.eu/u/gaurav.sharmapsit)\
**Post date:** [May 15, 2023, 7:45pm UTC](https://ask.bioexcel.eu/t/active-passive-to-ambig-py/4318/3 "2023-05-15T19:45:59Z")

</div>

Greetings and thank you for responding. I currently possess a protein-DNA complex that I acquired through ab initio docking. My objective now is to conduct site-specific docking. The interaction between the protein and DNA occurs through hydrogen bonding at two locations: Arg45-Thy65 and Arg144-Cyt122. Therefore, the following are the steps I intend to take:

1: _python passive\_from\_active.py protein-DNA.pdb active.list_ This command should give me the passive residues list  
active.list = 45,65,144,122  
2: active-passive-to-ambig.py active.list passive.list \> genrate.tbl

Is the above method correct?

Thanks,  
Gaurav Sharma

---

<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 16, 2023, 7:02am UTC](https://ask.bioexcel.eu/t/active-passive-to-ambig-py/4318/4 "2023-05-16T07:02:08Z")

</div>

> 1: _python passive\_from\_active.py protein-DNA.pdb active.list_ This command should give me the passive residues list  
> active.list = 45,65,144,122  
> 2: active-passive-to-ambig.py active.list passive.list \> genrate.tbl

I would do step 1) separately for the protein and the DNA

---

<div class="post-metadata">

**Author:** ![gaurav.sharmapsit](https://dub1.discourse-cdn.com/flex013/user_avatar/ask.bioexcel.eu/gaurav.sharmapsit/32/689_2.png) [@gaurav.sharmapsit](https://ask.bioexcel.eu/u/gaurav.sharmapsit)\
**Post date:** [May 16, 2023, 1:44pm UTC](https://ask.bioexcel.eu/t/active-passive-to-ambig-py/4318/5 "2023-05-16T13:44:14Z")

</div>

Thank you for your response. So, you mean to do these three steps?

1: python passive\_from\_active.py protein.pdb active\_protein.list \> passive\_protein.list  
2: python passive\_from\_active.py DNA.pdb active\_DNA.list \> passive\_DNA.list  
cat active\_protein.list active\_DNA.list \> active\_combined.list  
cat passive\_protein.list passive\_DNA.list \> passive\_combined.list  
3: active-passive-to-ambig.py active\_combined.list passive\_combined.list \> combined.tbl

Best,  
Gaurav Sharma

---

<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 16, 2023, 2:15pm UTC](https://ask.bioexcel.eu/t/active-passive-to-ambig-py/4318/6 "2023-05-16T14:15:03Z")

</div>

Yes - that should be it

---

<div class="post-metadata">

**Author:** ![gaurav.sharmapsit](https://dub1.discourse-cdn.com/flex013/user_avatar/ask.bioexcel.eu/gaurav.sharmapsit/32/689_2.png) [@gaurav.sharmapsit](https://ask.bioexcel.eu/u/gaurav.sharmapsit)\
**Post date:** [May 17, 2023, 5:50pm UTC](https://ask.bioexcel.eu/t/active-passive-to-ambig-py/4318/7 "2023-05-17T17:50:05Z")

</div>

So, I am trying to run this command  
python passive\_from\_active.py protein.pdb active\_protein.list \> passive\_protein.list  
but I am getting “The list of active residues must be provided as a comma-separated list of integers” in the passive\_protein.list file  
my active\_protein.list is 45,159  
Please tell me what I am doing wrong

---

<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 17, 2023, 7:01pm UTC](https://ask.bioexcel.eu/t/active-passive-to-ambig-py/4318/8 "2023-05-17T19:01:12Z")

</div>

The list of active residues must be provided as a comma-separated list of integers…

Edit the passive\_protein.list file accordingly

---

<div class="post-metadata">

**Author:** ![gaurav.sharmapsit](https://dub1.discourse-cdn.com/flex013/user_avatar/ask.bioexcel.eu/gaurav.sharmapsit/32/689_2.png) [@gaurav.sharmapsit](https://ask.bioexcel.eu/u/gaurav.sharmapsit)\
**Post date:** [May 17, 2023, 7:19pm UTC](https://ask.bioexcel.eu/t/active-passive-to-ambig-py/4318/9 "2023-05-17T19:19:19Z")

</div>

sorry I am confused.  
python passive\_from\_active.py protein.pdb active\_protein.list \> passive\_protein.list  
the above command is used to find the passive residues list from the active residues. Is this correct?

Thanks

---

<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 18, 2023, 6:54pm UTC](https://ask.bioexcel.eu/t/active-passive-to-ambig-py/4318/10 "2023-05-18T18:54:25Z")

</div>

Yes this is correct.

---

<div class="post-metadata">

**Author:** ![gaurav.sharmapsit](https://dub1.discourse-cdn.com/flex013/user_avatar/ask.bioexcel.eu/gaurav.sharmapsit/32/689_2.png) [@gaurav.sharmapsit](https://ask.bioexcel.eu/u/gaurav.sharmapsit)\
**Post date:** [May 25, 2023, 4:56pm UTC](https://ask.bioexcel.eu/t/active-passive-to-ambig-py/4318/11 "2023-05-25T16:56:47Z")

</div>

I have a file named “active\_protein.txt” that contains the values “45, 159”. When I run the command

“python passive\_from\_active.py protein.pdb active\_protein.list \> passive\_protein.list”

The resulting “passive\_protein.list” file displays the error message “The list of active residues must be provided as a comma-separated list of integers.” However, I am confused because my “active\_protein.list” file already contains comma-separated integers (specifically, “45, 159”). Could you please help me understand what I am doing wrong? Thank you.

---

<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 25, 2023, 6:59pm UTC](https://ask.bioexcel.eu/t/active-passive-to-ambig-py/4318/12 "2023-05-25T18:59:13Z")

</div>

Make sure that all residues defined in your list do exist in the PDB file

Further, are “45, 159” the only residues in your active list?

Difficult to investigate without having your files at hand.

---

<div class="post-metadata">

**Author:** ![gaurav.sharmapsit](https://dub1.discourse-cdn.com/flex013/user_avatar/ask.bioexcel.eu/gaurav.sharmapsit/32/689_2.png) [@gaurav.sharmapsit](https://ask.bioexcel.eu/u/gaurav.sharmapsit)\
**Post date:** [May 25, 2023, 7:36pm UTC](https://ask.bioexcel.eu/t/active-passive-to-ambig-py/4318/13 "2023-05-25T19:36:39Z")

</div>

[protein\_DNA.pdb](https://ask.bioexcel.eu/uploads/short-url/1y7P3WNW1bKIv4O49oxOMVILqrY.pdb) (338.9 KB)

Thank you for responding. One error I made was that the residue numbering of the protein started from 24. However, I corrected it and now the residues are numbered starting from 1. The new amino acids binding to the DNA are at positions 22 and 136. Despite these changes, I am still encountering the same error. Please find the attached PDB file. Your assistance is greatly appreciated.

Gaurav

---

<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 25, 2023, 8:25pm UTC](https://ask.bioexcel.eu/t/active-passive-to-ambig-py/4318/14 "2023-05-25T20:25:53Z")

</div>

The simple solution in your case would be to manually pick up the surface neighbours of your active residues from a visual inspection

---

<div class="post-metadata">

**Author:** ![gaurav.sharmapsit](https://dub1.discourse-cdn.com/flex013/user_avatar/ask.bioexcel.eu/gaurav.sharmapsit/32/689_2.png) [@gaurav.sharmapsit](https://ask.bioexcel.eu/u/gaurav.sharmapsit)\
**Post date:** [May 25, 2023, 10:02pm UTC](https://ask.bioexcel.eu/t/active-passive-to-ambig-py/4318/15 "2023-05-25T22:02:47Z")

</div>

Yes, that is what I was doing this far. However, I am now seeking to integrate ab initio docking and blind docking methods to automate the entire process. I was wondering if there are alternative approaches available for achieving this. I would prefer not to explore alternative software options, as the results obtained from Haddock have proven to be highly accurate.  
Any suggestions or guidance would be greatly appreciated.  
Thank you

---

<div class="post-metadata">

**Author:** ![honoratorv](https://dub1.discourse-cdn.com/flex013/user_avatar/ask.bioexcel.eu/honoratorv/32/672_2.png) [@honoratorv](https://ask.bioexcel.eu/u/honoratorv)\
**Post date:** [May 26, 2023, 8:06am UTC](https://ask.bioexcel.eu/t/active-passive-to-ambig-py/4318/16 "2023-05-26T08:06:51Z")

</div>

Thanks for your persistence @gaurav.sharmapsit!

I’ve had a look in the script, from the `-h` command you see what are the arguments:

```plaintext
$ python passive_from_active.py -h
usage: passive_from_active.py [-h] [-c CHAIN_ID] [-s SURFACE_LIST] pdb_file active_list

positional arguments:
  pdb_file PDB file
  active_list List of active residues IDs (int) separated by commas

optional arguments:
  -h, --help show this help message and exit
  -c CHAIN_ID, --chain-id CHAIN_ID
                        Chain id to be used in the PDB file (default: All)
  -s SURFACE_LIST, --surface-list SURFACE_LIST
                        List of surface residues IDs (int) separated by commas

```

And based in your previous comment, seems that the command you are typing is wrong:

> [@gaurav.sharmapsit](#):
>
> “python passive\_from\_active.py protein.pdb active\_protein.list \> passive\_protein.list”

it should be instead without `active_protein.list`:

```plaintext
$ python passive_from_active.py protein.pdb 45,159

```

Keep in mind that there are no spaces between the commas.

However, unfortunately DNA is not supported by this script:

```plaintext
$ python passive_from_active.py protein_DNA.pdb 45,159                  
There was an error while calculating surface residues: Error: Radius is <= 0 (-1.0) for the residue: DC, atom: O5*

```
