# Negative restraints in haddock

**URL:** https://ask.bioexcel.eu/t/negative-restraints-in-haddock/3285
**Category:** HADDOCK
**Created:** [October 7, 2021, 2:15pm UTC](https://ask.bioexcel.eu/t/negative-restraints-in-haddock/3285 "2021-10-07T14:15:13Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![MOsborne](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@MOsborne](https://ask.bioexcel.eu/u/MOsborne)
#### Post date: [October 7, 2021, 2:15pm UTC](https://ask.bioexcel.eu/t/negative-restraints-in-haddock/3285/1 "2021-10-07T14:15:13Z")

</div>

Hi Everyone  
Is it possible to use nagtive contraints in haddock. i.e assign an energy penalty if a residue on one protein gets close to another.  
Also in the webserver is it possible to assign AIR for atoms and not just residues?  
Thanks in advance  
MIke

---

<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: [October 7, 2021, 4:24pm UTC](https://ask.bioexcel.eu/t/negative-restraints-in-haddock/3285/2 "2021-10-07T16:24:11Z")

</div>

Yes you can, for example by setting a minimal lower bound, e.g. 20A and defining a very large upper limit, e.g. 500A

The restraint would look like:

```
assign (segid A and residue XX) (segid B and residue YY) 500.0 480.0 0.0

```

or  
assign (segid A and residue XX) (segid B and residue YY) 20.0 0.0 480.0

both give the same range of distance: between 20 and 500A (i.e. the minimal distance is thus 20A)

If you don’t know a specific residue in protein B, I would then modify the restraint to:

```
assign (segid A and residue XX) (segid B and name CA) 500.0 480.0 0.0

```

i.e. the second selection is only to CA atoms to limit the number of atoms selected and save computing time

As a reminder, distance restraints are defined as:

```
assign (selection1) (selection2) distance lower-bound correction upper-bound correction

```

where the lower limit for the distance is calculated as: distance minus lower-bound correction and the upper limit as: distance plus upper-bound correction.
