# Str\_check\_add\_hydrogens

**URL:** https://ask.bioexcel.eu/t/str-check-add-hydrogens/3777
**Category:** BioBB
**Created:** [June 20, 2022, 2:24pm UTC](https://ask.bioexcel.eu/t/str-check-add-hydrogens/3777 "2022-06-20T14:24:46Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![pbarletta](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@pbarletta](https://ask.bioexcel.eu/u/pbarletta)
#### Post date: [June 20, 2022, 2:24pm UTC](https://ask.bioexcel.eu/t/str-check-add-hydrogens/3777/1 "2022-06-20T14:24:46Z")

</div>

Hi all,

I’ve run into 2 issues related to the `check_structure` tool.

1. `keep_h`, listed [here](https://biobb-structure-checking.readthedocs.io/en/latest/biobb_structure_checking.html#module-biobb_structure_checking.structure_checking) is not actually supported with version biobb version 3.7.6 (my check\_structure version is 3.9.11). I get this warning when I try to use it:

```auto
/home/pbarletta/anaconda3/envs/locuaz/lib/python3.7/site-packages/biobb_common/generic/biobb_object.py:71: UserWarning: Warning: keep_h is not a recognized property. The most similar property is: ph
  error_property, close_property))

```

And indeed, when I check the docstrings for [StrCheckAddHydrogens](https://github.com/bioexcel/biobb_structure_utils/blob/f29a8a884aac0b59aa66c8a50e99de6a53d7bba1/biobb_structure_utils/utils/str_check_add_hydrogens.py#L11), it’s not there.

1. I can’t understand the selection syntax for the `add_hydrogen` command.  
Say I want to add hydrogens to the 3rd residue of the B chain, which is a glutamate.  
If I use this properties dictionary:

```auto
prop = {
    'charges': False,
    'mode': 'list',
    'list': "GLU3GLU"
}

```

I get an error:

```auto
h_rules[ion_res_list[res]] 
KeyError: False

```

And if I use this one:

```auto
prop = {
    'charges': False,
    'mode': 'list',
    'list': "GLU3GLU"
}

```

it runs, but it modifies every residue. I tried some other variations, sometimes I’d get this:

```auto
#ERROR: no mutations available for *:GLUB3

```

I couldn’t get it working on the terminal either (calling `check_structure` directly).

I’d appreciate any help on these issues.

Cheers,

---

<div class="post-metadata">

### Author: ![gelpi](https://dub1.discourse-cdn.com/flex013/user_avatar/ask.bioexcel.eu/gelpi/32/17_2.png) [@gelpi](https://ask.bioexcel.eu/u/gelpi)
#### Post date: [July 1, 2022, 2:38pm UTC](https://ask.bioexcel.eu/t/str-check-add-hydrogens/3777/2 "2022-07-01T14:38:03Z")

</div>

Hi,

1. keep\_h will be added to the Building-block, thanks for pointing this out.
2. add\_hydrogen indeed adds hydrogen atons to all residues in the protein. This is the intended behaviour. It is not possible to add H only to some residues (the functionality could be added but I’m not sure in which scenario this this could be necessary).  
The provided selection option allows to define which protonation states shoud be used when they are not the default (GLU will become a negatively charged Glu by default, no need to indicate, to get a neutral one the selection would be GLU3GLH). In any case I will check the error that should not appear (as you are asking for the default protonation state).  
Hope this helps.

Josep L.
