Skip to content Skip to navigation


You are here: Home » Content » Protein Inverse Kinematics and the Loop Closure Problem


Recently Viewed

This feature requires Javascript to be enabled.

Protein Inverse Kinematics and the Loop Closure Problem

Module by: Lydia E. Kavraki. E-mail the author

Summary: This module introduces students to inverse kinematics, which is the problem of finding values of the degrees of freedom of a manipulator chain so that the chain satisfies given spatial constraints. An application of inverse kinematics to solve the loop closure problem in structural biology is also presented.

Note: You are viewing an old version of this document. The latest version is available here.

Background Material

The math involved in solving the Inverse Kinematics problem requires some background in linear algebra, specifically in the anatomy and application of transformation matrices. Please refer to Forward Kinematics for an introduction to transformation matrices. It is very important that you understand how to apply transformations for the Forward Kinematics of a chain.

Inverse Kinematics and its Relevance to Proteins

Inverse kinematics (IK) is the problem of finding the right values for the underlying degrees of freedom of a chain, in the case of a protein polypeptide chain, of the dihedral angles, so that the chain satisfies certain spatial constraints. For example, in some applications, it is necessary to find rotations that can steer certain atoms to desired locations in space. To achieve a particular function, protein regions sometimes have to undergo concerted motion where atoms move together in order to locate themselves near another protein or molecule. The motion of atoms is spatially constrained because they have to assume specific target locations in space. However, since atoms must move together in order not to break bonds by their motion, it is easier to model their motion in dihedral angle space, where bond lengths and bond angles are fixed. This parameterization of protein motion, called the idealized or rigid geometry model, is discussed in Representing Proteins in silico: Data Structures and Kinematics.

Solving the Inverse Kinematics problem in the context of proteins, i.e., finding what values of the dihedral angles of a protein polypeptide chain yield configurations of the chain where the endpoints satisfy spatial constraints, is a very important problem in structural biology. The relevance of Inverse Kinematics for proteins can be seen in three main applications:

  • Finding a missing loop (Loop Closure Problem)
  • Characterizing the Flexibility of a fragment of the protein polypeptide chain
  • Generating ensembles of protein structures
It is worth noting that many globular proteins have a relatively stable, inflexible core region consisting of tightly arranged secondary structure elements. However, proteins are less compact and more flexible at the surface, where unstructed fragments of the protein polypeptide chain, mobile loops, may swing freely. One consequence of loop mobility is that experimental structure determination methods may have difficulty resolving the atomic positions of surface loops. The positions of the atoms in mobile loops may be so inconsistent that no single position relative to the core dominates. In such cases, experimental structure determination methods cannot determined the positions of the atoms of a mobile loop.

When this happens, the result is a partially resolved protein structure, with fragments of the protein chain, such as mobile loops, missing. The only information available for the missing fragment is its amino acid sequence and where its two endpoints need to be spatially located in order to connect with the known, resolved, part of the protein structure. Given the spatial constraints on the endpoints of the missing fragment, one needs to find values to the dihedral angles of the fragment in order to obtain configurations of the fragment consistent with the constraints. This problem is known as the Loop Closure problem in the structural biology community. It is easy to note that even though this problem is cast in the context of finding atomic positions of a missing fragment such as a mobile loop, it is nothing new but a statement of the Inverse Kinematics problem for proteins.

Solving the Inverse Kinematics problem in the context of a missing fragment in proteins is not limited to finding mobile loops. More generally, through the Inverse Kinematics problem, one can search for alternative configurations of any fragment of a protein polypeptide chain (even fragments containing secondary structural elements) that satisfy the spatial constraints on their endpoints. Very recently, a third application has emerged, where alternative configurations of consecutive fragments that cover a polypeptide chain are generated to obtain an ensemble of alternative protein structures.

Solving Inverse Kinematics

In applying inverse kinematics algorithms to proteins, we are taking advantage of a striking similarity between organic molecules and robotic manipulators (robot arms) in terms of how they move. As robot manipulators have joints, proteins have atoms. As robot manipulators have links that connect their joints, proteins have bonds that connect their atoms. The similarity between proteins and robots makes it possible for us to apply to proteins a large existing literature of solutions to the Inverse Kinematics problem, developed in the context of robot manipulators (robotic arms).

Before we proceed with some simple inverse kinematics examples, note that inverse kinematics is the inverse of the forward kinematics problem. Therefore, an immediate attempt to solve the inverse kinematics problem would be by inverting forward kinematics equations.

Let's illustrate how to solve the inverse kinematics problem for robot manipulators on a simple example. The figure below shows a simple planar robot with two arms. The underlying degrees of freedom of this robot are the two angles dictating the rotation of the arms. These are labelled in the figure below as θ1 and θ2. The inverse kinematics question in this case would be: What are the values for the degrees of freedom so that the end effector of this robot (the tip of the last arm) lies at position (x,y) in the two-dimensional Cartesian space? One straightforward approach to solving the problem is to try to write down the forward kinematics equations that relate (x,y) to the two rotational degrees of freedom (see Forward Kinematics for details on how to do so), then try to solve these equations. The solutions will give you an answer to the inverse kinematics problem for this robot.

Figure 1: Illustration of solving the Inverse Kinematics problem for a simple planar robot with two arms. Figure is adapted from MathWorks.
Simple Example Non-unique Solutions
(a) Steer end-effector to (x, y) target position. (b) Two solutions depicted for this IK problem.
Simple Example  (IK_example1.png) Non-unique Solutions  (IK_example2.png)

Exercise 1

Given an (x, y) target position for the end-effector of a robot with only two degrees of freedom θ1 and θ2, what are the solutions for θ1 and θ2?


You can compare your answer with the derivation steps below.

Figure 2: Finding solutions to θ1 and θ2 from the forward kinematics equations of the 2-arm planar robot.
Simple Example Solved
 Simple Example Solved  (IK_example1_sol.png)
You can see that there can be 0, 1, or 2 solutions for this example. Where does the non-uniqueness of the solutions lie in the answers we derive?

As it can be seen in the example above, the solutions to an inverse kinematics problem are not necessarily unique. In fact, as the number of degrees of freedom increases, so does the maximum number of solutions, as depicted in the figure. It is also possible for a problem to have no solution if the point on the robot cannot be brought to the target point in space at all.

While the above example offers equations that are easy to solve, general inverse kinematics problems require solving systems of nonlinear equations for which there are no general algorithms. Some inverse kinematics problems cannot be solved analytically. In robotics, it is sometimes possible to design systems to have solvable inverse kinematics, but in the general case, we must rely on approximation methods in order to keep the problem tractable, or, in some cases, even solvable. For examples on how to address inverse kinematics in particular robotic systems, please read chapter 4 of [1]. An illustration of the solutions of the inverse kinematics problem for a robot which is widely used in industry is shown below.

Figure 3: The spatial constraint on the end-effector of this three-dimensional manipulator can be satisfied by a maximum of four different configurations of the manipulator. Figure is obtained from Serial Robots .
More Realistic Example
 More Realistic Example  (IK_multi_sols.png)

Inverse Kinematics Methods

Inverse kinematics methods are categorized into two main groups:

  • exact, classic, or algebraic methods
  • heuristic, or optimization methods
While exact methods are complete, i.e. they report all solutions, they can only find solutions for chains with up to nine degrees of freedom. Hierarchical approaches break long chains into smaller ones for which exact methods provide answers. More powerful methods, referred to as optimization or heuristic methods, though not complete, are unrestricted in the number of degrees of freedom in the systems about which they reason.

Classic Inverse Kinematics Methods

It is known that for manipulators with no more than six degrees of freedom, there is a finite number of solutions to the inverse kinematics problem [1]. There is, however, no analytical method that can find these solutions for all types of manipulators. For manipulators with only revolute joints, which is the case for biomolecules with idealized geometry, the number of unique solutions is at most 16, when the number of degrees of freedom does not exceed six [6]. An efficient solution was proposed in [8] and later applied to the conformational analysis of small molecular chains [9], [10]. Methods based on curve approximation were proposed in [7] for the inverse kinematics of hyper-redundant robots, where the number of regularly distributed joints is very large.

Specialized solutions to inverse kinematics in biochemistry appeared as early as 1970 [12], where fragments of up to 6 degrees of freedom were predicted by solving a set of polynomial equations representing geometric transformations. These equations were applied to building tripeptide loops [12] under the ideal geometry assumption. Later work [15], [13], [10], [14] offered efficient analytical solutions for three consecutive residues through spherical geometry and polynomial equations. Bounding inverse kinematic solutions for chains with no more than six degrees of freedom within small intervals has also been shown relevant in the context of drug design [11]. A new formulation that extends the domain of solutions to any three residues, not necessarily consecutive, and with arbitrary geometry, was recently proposed [16]. Current work that pushes the dimensionality limit from six to nine degrees of freedom makes use of an efficient subdivision of the solution space [17].

Inverse Kinematics Methods with Optimization

Currently, optimization-based solutions are considered most appropriate for accommodating chains with arbitrary numbers of degrees of freedom. Two well-known optimization-based inverse kinematics solutions that iteratively solve a system of equations until loops are closed are Random Tweak [18], [19] and Cyclic Coordinate Descent (CCD) [3], [4], [5]. Both methods are based on iteratively setting the dihedral degrees of freedom of a fragment or kinematic chain until the end effector (atom for a protein) reaches a target position.

Random tweak relies on the computation of the Jacobian (a high-dimensional analog of the derivative of a function on real numbers), a process that is computationally expensive and numerically unstable. In addition to not being free from mathematical singularities, random tweak does not allow additional constraints on individual residues because modifications to dihedral angles are introduced all at once, with a strong dependence of each dihedral proposed change on all the others. Additional constraints on the dihedrals may result in the unpredictable motion of a feature atom away from rather than toward its target position.

Avoiding the use of the Jacobian, CCD is computationally inexpensive, numerically stable, and free from singularities. CCD avoids the interdependence of dihedral angles by adjusting only a single degree of freedom at a time. This allows for additional constraints on dihedral angles with a predictable motion of the end effector towards the target position. First introduced in the context of non-linear programming [3] , CCD was found applications in the robotics [4] community, and later in the structural biology community in the context of the loop closure problem for proteins[5].

Cyclic Coordinate Descent and Its Application to Proteins

CCD tries to find an optimal angle by which to rotate a single bond so as to steer a desired atom towards its target position. When applying CCD to find dihedral angles of a fragment of the polypeptide chain so that the ends of the fragment connect properly with the rest of the chain, it is important to steer not just one atom of the end of the fragment, but the three backbone atoms of the end simultaneously. Fiding values to the dihedral angles that steer the three backbone atoms of the end of the fragment simultaneously to their target positions guarantees that the end of the fragment will assume both its target position and orientation in space. We will explain how to find optimal values to the dihedral angles of a fragment by which to simultaneously steer the three backbone atoms of the end of the fragment to their target positions. We first define their current positions M and their target positions F, as shown in the figure below. The goal is to minimize the Euclidean distance between the current and the target positions for all three atoms simultaneously. That is why we define an objective function S that sums the squared distances per atom.

Figure 4: Schematics of Cyclic Coordinate Descent
CCD Schematics Finding Optimal Angle
(a) Find optimation dihedral rotation for the current bond so that all three desired atoms reach their target positions. (b) Since S is defined as the sum of squared distances between current positions and target positions, steering these three atoms to their target positions requires minimizing S. Therefore, the optimal dihedral rotation can be found by minimizing S.
 CCD Schematics  (c_d_ccd_schematic.png) Finding Optimal Angle  (c_d_equations_setup.png)
The question then becomes that of finding a rotation along the rotation axis O, shown in the figure, that minimizes S. First, we need to define S as a function of the angle we are trying to find. Doing so is not hard, since rotation by this angle is a two-dimensional rotation. In the figure above we have shown how the position of an atom can be updated through a two-dimensional rotation by the angle around the rotation axis. In this way we obtain an expression that relates S to the angle we want to find. Since this angle has to minimize S, it has to provide a solution to the first order derivative of S set to 0. This is shown below in Figure 5. Simplifying the expression for the first order derivative of S set to 0 gives us a formula for tan(αα) . CCD is a very efficient method due to the fact that it obtains the value for α analytically. However, an expression for the tangent does not provide a unique value for the angle. This is a consequence of the fact that the derivative of S set to 0 corresponds not only to minima, but also to local maxima. In order to find the angle that indeed minimizes S, one would have to make sure that the second order derivative of S is greater than 0. This is more cumbersome. There is a way to avoid doing such calculations by realizing that the formula we received for S in terms of the angle we want to solve for, can be rewritten as shown in Figure 5. In this way, one can obtain a value for both the cosine and the sine of the angle, which now uniquely determines the optimal angle.
Figure 5: Solution to the minimization of S
CCD Solution Better Solution
(a) Posing a minimization procedure reveals the value for the optimal angle. (b) The correct quadrant can be determined by rewriting S.
 CCD Solution  (c_d_equations_solutions.png) Better Solution  (c_d_equations_better_solution.png)

Unlike classic inverse-kinematics solutions that use Jacobian matrices [18], [19], or general numerical approaches, CCD is free of singularities and does not depend on initial guesses for solutions. Compared to inverse kinematics techniques with optimization that suffer from high computational times, CCD is computationally fast. Unlike other methods such as random tweak, CCD gives predictable behavior and suffers from no anomalies when additional constraints are added to the dihedrals (e.g. constraints imposed by the physico-chemical forces on the protein). Such properties make CCD very appealing.

Because CCD solves for the degrees of freedom of a chain one at a time, the method finds the optimal values for all the degrees of freedom of the chain iteratively, according to some order. CCD iterates over the degrees of freedom according to a predetermined order (e.g. a straighforward implementation of the method may use the identity order, where degrees of freedom are numbered consecutively in increasing order from the base to the end effector of the chain), solving for each one of them at a time. This process of iterating over all the degrees of freedom can be repeated a maximum number of times or until the end effector lies within an epsilon distance of its position and orientation in space.

While not able to enumerate all the solutions to the degrees of freedom, CCD guarantees it will find a solution if one exists. Given a configuration of the chain and a target position and orientation for the chain's end effector, CCD iteratively modifies the degrees of freedom of the chain until either it runs out of iterations or it manages to satisfy the spatial constraint on the end effector. Due to its computational efficiency (linear time complexity on the number of degrees of freedom of the chain), CCD has been applied to determine atomic positions of missing mobile loops of arbitrary length[5]. A similar application complete missing loops in partially resolved crystallographic structures can be found in [21], [22], [20].

A recent application of CCD to not just loops but any fragment of a protein polypeptide chain can be found in[23]. The work in [23] applies CCD to configurations of a fragment that are sampled uniformly at random to obtain an ensemble of fragment configurations that connects with the rest of the protein polypeptide chain. Careful attention is paid to the energetic refinement of the obtained fragment configurations in order to ensure the biological relevance of the configurations at room temperature. The usage of CCD in [23] to obtain an ensemble of biologically meaningful configurations of a fragment of the polypeptide chain is an interesting application to capture the flexibility of a fragment in the context of a given protein structure. By generating ensembles of biologically relevant configurations for fragments that are defined consecutively and with significant overlap over the protein polypeptide chain, the work in [23] offers a novel approach to capture the flexibility of the entire polypeptide chain.

Recommended Reading

  • Canutescu, A.A. and R.L. Dunbrack. [PDF] . Cyclic Coordinate Descent: A Robotics Algorithm for Protein Loop Closure. Protein Science, 12:963-72, 2003.
  • Craig, J.J. Introduction to Robotics, chapter 4. Reading, MA: Addison-Wesley, 1989.
  • van den Bedem, H. and Lotan, I and Deacon, A. M. and Latombe, J.-C.. [PDF] . Computing protein structures from electron density maps: the mising loop problem. Algorithmic Foundations of Robotics VI, 345-360, 2005.
  • Shehu, A. and Clementi, C. and Kavraki, L.E. [PDF] . Modeling Protein Conformational Ensembles: From Missing Loops to Equilibrium Fluctuations. Proteins: Structure, Function, Bioinformatics, 65(1):164-179, 2006.


  1. Craig, J. J. (1989). Introduction to Robotics. Reading, MA: Addison-Wesley.
  2. M. Zhang, and L. E. Kavraki. (2002). A New Method for Fast and Accurate Derivation of Molecular Conformations. []. Journal of Chemical Information and Computer Sciences, 42, 64-70.
  3. Luenberger, D. G. (1984). Linear and Nonlinear Programming. Addison-Wesley.
  4. L. T. Wang, and C. C. Chen. (1991). A combined optimization method for solving the inverse kinematics problem of mechanical manipulators. []. IEEE Transactions on Robotics and Automation, 7, 489-499.
  5. A. A. Canutescu, and R. L. Dunbrack. (2003). Cyclic Coordinate Descent: A Robotics Algorithm for Protein Loop Closure. []. Protein Science, 12, 963-972.
  6. M. Raghavan, and B. Roth. (1989). Kinematic analysis of the 6R manipulator of general geometry. []. International Symposium on Robotics Research.
  7. G. S. Chirikjian. (1993). General methods for computing hyper-redundant manipulator inverse kinematics. []. IEEE/RSJ International Conference on Intelligent Robots and Systems.
  8. D. Manocha, and J. Canny. (1994). Efficient inverse kinematics for general 6R manipulator. []. IEEE Transactions on Robotics and Automation, 10, 648-657.
  9. D. Manocha, and Y. Zhu. (1994). Kinematic manipulation of molecular chains subject to rigid constraints. []. International Conference on Intelligent Systems for Molecular Biology, 2, 285-293.
  10. D. Manocha, and Y. Zhu, and W. Wright. (1995). Conformational analysis of molecular chains using nano-kinematics. []. Computer Applications in Biosciences, 11, 71-86.
  11. M. Zhang, and L. E. Kavraki. (2002). Solving Molecular Inverse Kinematics Problems for Protein Folding and Drug Design. []. Currents in Computational Molecular Biology, 214–215.
  12. N. Go, and H. J. Scheraga. (1970). Ring closure and local conformational deformations of chain molecules. []. Macromolecules, 3, 178-187.
  13. K. A. Palmer, and H. J. Scheraga. (1991). Standard-geometry chains fitted to x-ray derived structures : Validation of the rigid-geometry approximation. i. chain closure through a limited search of loop conformations. []. Journal Computational Chemistry, 12, 505-526.
  14. W. J. Wedemeyer, and H. J. Scheraga. (1999). Exact analytical loop closure in proteins using polynomial equations. []. Journal Computational Chemistry, 20, 819-844.
  15. R. E. Bruccoleri, and M. Karplus. (1985). Chain closure with bond angle variations. []. Macromolecules, 18, 2676-2773.
  16. E. Coutsias, and C. Seok, and M. Jacobson, and K. Dill. (2004). A Kinematic View of Loop Closure. []. Journal of Computational Chemistry, 25, 510-528.
  17. M. Zhang, and R. A. White, and L. Wang, and R. Goldman, and L. E. Kavraki, and B. Hasset. (2004). Improving Conformational Searches by Geometric Screening. []. Journal of Bioinformatics, 7, 624-630.
  18. R. M. Fine, and H. J. Wang, and P. S. Shenkin, and D. L. Yarmush, and C. Levinthal. (1986). Predicting antibody hypervariable loop conformations. II: Minimization and molecular dynamics studies of MCPC603 from many randomly generated loop conformations. []. Proteins, 1, 342-362.
  19. P. S. Shenkin, and D. L. Yarmush, and R. M. Fine, and H. J. Wang, and C. Levinthal. (1987). Predicting antibody hypervariable loop conformations. I: Ensembles of random conformations for ring-like structures. []. Biopolymers, 26, 2053-2085.
  20. H. van den Bedem, and I. Lotan, and J.-C. Latombe, and A. Deacon. (2005). Real-Space Protein-Model Completion: an Inverse-Kinematics Approach. []. Acta Crystallographica, D61, 2-13.
  21. I. Lotan. (2004). Algorithms exploiting the chain structure of proteins. []. Ph.D. thesis, Stanford University.
  22. H. van den Bedem, and I. Lotan, and A. Deacon, J.-C. Latombe. (2005). Computing protein structures from electron density maps: the mising loop problem. []. Algorithmic Foundations of Robotics VI, 345-360.
  23. A. Shehu, and C. Clementi, and L. E. Kavraki. (2006). Modeling Protein Conformational Ensembles: From Missing Loops to Equilibrium Fluctuations. []. Proteins: Structure, Function, and Bioinformatics, 65(1), 164-179.

Content actions

Download module as:

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens


A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks