# NameError: global name 'tmpdir' is not defined

**URL:** https://ask.bioexcel.eu/t/nameerror-global-name-tmpdir-is-not-defined/2348
**Category:** HADDOCK
**Created:** [July 22, 2020, 4:16pm UTC](https://ask.bioexcel.eu/t/nameerror-global-name-tmpdir-is-not-defined/2348 "2020-07-22T16:16:11Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![dburns](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@dburns](https://ask.bioexcel.eu/u/dburns)
#### Post date: [July 22, 2020, 4:16pm UTC](https://ask.bioexcel.eu/t/nameerror-global-name-tmpdir-is-not-defined/2348/1 "2020-07-22T16:16:11Z")

</div>

Hi,

I’m trying my first local docking run. I got the following error:

reading parameters from the file ./run.param  
setting some variables:  
N\_COMP set to: 2  
RUN\_NUMBER set to: 1  
HADDOCK\_DIR set to: …/…/SOFTWARE/haddock2.4  
PDB\_FILE1 set to: ./EIC\_mol3-noligand.pdb  
AMBIG\_TBL set to: ./eicmol3-ambig.tbl  
PROJECT\_DIR set to: .  
PDB\_FILE2 set to: ./mol3.pdb  
runDir= ./run1  
project . exists, run 1 does not exist  
create the new run 1  
./EIC\_mol3-noligand.pdb copied to ./run1/data/sequence after removing the chain and segIDs  
./mol3.pdb copied to ./run1/data/sequence after removing the chain and segIDs  
editing run.cns: setting the default values  
Traceback (most recent call last):  
File “/work/LAS/potoyan-lab/Dan/SOFTWARE/haddock2.4/Haddock/RunHaddock.py”, line 156, in   
new[‘CRYO-EM\_FILE’],  
File “/work/LAS/potoyan-lab/Dan/SOFTWARE/haddock2.4/Haddock/Main/Setup.py”, line 385, in SetupNewProject  
if not segiddict[ccjj]: segiddict[ccjj] = tmpdir[ccjj]  
NameError: global name ‘tmpdir’ is not defined

Thank you,

Dan

---

<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: [July 22, 2020, 4:46pm UTC](https://ask.bioexcel.eu/t/nameerror-global-name-tmpdir-is-not-defined/2348/2 "2020-07-22T16:46:22Z")

</div>

Which version of HADDOCK are you running?

This should be corrected in the July release.

Also your version might still work if you define the segid for each molecule in `run.param`, e.g.:

```auto
PROT_SEGID_1=A
PROT_SEGID_2=B
PROT_SEGID_3=C
...

```

---

<div class="post-metadata">

### Author: ![dburns](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@dburns](https://ask.bioexcel.eu/u/dburns)
#### Post date: [July 22, 2020, 4:49pm UTC](https://ask.bioexcel.eu/t/nameerror-global-name-tmpdir-is-not-defined/2348/3 "2020-07-22T16:49:19Z")

</div>

I’m using 2.4. Do I need to add a chain ID “A” column to the pdb file for the PROT\_SEGID\_1=A to work?

Thanks!  
Dan

---

<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: [July 22, 2020, 5:02pm UTC](https://ask.bioexcel.eu/t/nameerror-global-name-tmpdir-is-not-defined/2348/4 "2020-07-22T17:02:31Z")

</div>

2.4 but which release?

No need in principle to modify your PDBs, but do define the PROT\_SEGID… in run.param for each molecule.

And/or get the latest July release.

---

<div class="post-metadata">

### Author: ![dburns](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@dburns](https://ask.bioexcel.eu/u/dburns)
#### Post date: [July 22, 2020, 5:06pm UTC](https://ask.bioexcel.eu/t/nameerror-global-name-tmpdir-is-not-defined/2348/5 "2020-07-22T17:06:29Z")

</div>

I’ve got an April, 2018 release. Adding the seg\_id fixed it!

Thank you!

Dan

---

<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: [July 22, 2020, 5:23pm UTC](https://ask.bioexcel.eu/t/nameerror-global-name-tmpdir-is-not-defined/2348/6 "2020-07-22T17:23:39Z")

</div>

Good - but you might want the latest release - e.g. support for glycosylated proteins and various fixes.  
Drop me an email.
