Increase the torsion limit in Autodock4 to 64.

Although I got the message from forum that two many torsions were not accurate for docking. But I had no choice, the professor asked me to include more residues.

The method is following. I got help from

1. download the source from

2. tar xvzf autodocksuite-4.2.6-src.tar.gz

3. cd src/autodock # the unzipped folder

4. vi constants.h, change the following lines

#define NLIGTOR      64       /* Max. num. of torsions in each ligand */

#define MAX_TORS     64       /* Maximum number of torsions in Small Molecule. */

#define TOR_ARG_LIST &sInit.tor[0], &sInit.tor[1], &sInit.tor[2], &sInit.tor[3], &sInit.tor[4], &sInit.tor[5], &sInit.tor[6], &sInit.tor[7], &sInit.tor[8], &sInit.tor[9], &sInit.tor[10], &sInit.tor[11], &sInit.tor[12], &sInit.tor[13], &sInit.tor[14], &sInit.tor[15], &sInit.tor[16], &sInit.tor[17], &sInit.tor[18], &sInit.tor[19], &sInit.tor[20], &sInit.tor[21], &sInit.tor[22], &sInit.tor[23], &sInit.tor[24], &sInit.tor[25], &sInit.tor[26], &sInit.tor[27], &sInit.tor[28], &sInit.tor[29], &sInit.tor[30], &sInit.tor[31], &sInit.tor[32], &sInit.tor[33], &sInit.tor[34], &sInit.tor[35], &sInit.tor[36], &sInit.tor[37], &sInit.tor[38], &sInit.tor[39], &sInit.tor[40], &sInit.tor[41], &sInit.tor[42], &sInit.tor[43], &sInit.tor[44], &sInit.tor[45], &sInit.tor[46], &sInit.tor[47], &sInit.tor[48], &sInit.tor[49], &sInit.tor[50], &sInit.tor[51], &sInit.tor[52], &sInit.tor[53], &sInit.tor[54], &sInit.tor[55], &sInit.tor[56], &sInit.tor[57], &sInit.tor[58], &sInit.tor[59], &sInit.tor[60], &sInit.tor[61], &sInit.tor[62], &sInit.tor[63]

After editing the file,use :wq! to save it, because it’s read-only, please add “!”

5. vi autocomm.h, change the following lines

const unsigned int MAX_LINES=512;    /* Number of lines in parameter file              */

const /* not unsigned */ int LINE_LEN=512;    /* Line length in characters                      */

Use :wq! to save it.

6. mkdir a new folder, I used “self”. cd self

7. run the following command to compile it.



make check

8. Check the Testruns folder, to see if the test is passed.

9. cp autodock4 ~/bin

10. run ~/bin/autodock4 -v, you can see the program information, in which the edited torsions can be seen as Maximum number of torsions in ligand and flexres (MAX_TORS): 64


2 thoughts on “Increase the torsion limit in Autodock4 to 64.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s