# How would I make a basic protein folding algorithm? [closed]

On the face of it it doesn't seem especially difficult. Model the amino acids as solid objects linked together. Approximate the 3D force fields around them using a coarse approximation, then set the simulation going in a computer and see what happens.

Why is this such a difficult problem that it has taken decades to crack? Are there subtle difficulties not apparent in the above model?

• The pdb has thousands of structures you can download, but I suggest reading a bit of liters before you start. There’s lots of info already out there about different approaches and how they work. Dec 13 '20 at 19:10
• It is certainly easy for the protein to find its folded conformation (in most cases, it takes less than a second). It is difficult for us, however, and for molecular dynamics or other simulations (most attempts get it wrong). Deep neural networks, fed with ten thousands of crystal structures showing how proteins actually fold, now do a decent job with proteins of unknown structure (not sure about the computational cost). Dec 14 '20 at 2:20
• One issue is that md steps have to be tiny, far, far less than a nanosecond to be accurate but it takes billions and billions of steps to fold to the proper structure as there are so many options that have to be tried to find the true structure and time just runs out to complete the task. Just recently, training with neural networks appears to have worked v. well, but it may not tell us just how the real protein did this, which may, or may not matter, depending on your viewpoint. Dec 14 '20 at 8:40
• First, don't try from scratch: there are many attempts at this over decades and, until recently, few have worked well. Learn from them to save yourself a great deal of effort. Second, don't start your attempt until you can afford a supercomputer or equivalent. That is what the professional teams have. Dec 14 '20 at 13:34
• @matt_black True, but I would imagine if someone were to find a way to solve the problem using desktop computing that would be quite useful. (If a little unlikely!) Dec 14 '20 at 23:36

It is far, far more difficult that a naive approach suggests

The reason why simulating protein folding is extremely hard is the combinatorial complexity of the options you have to explore to get the "right" answer. This exhausts your computers memory or computing capacity far faster than it will for simple molecules.

It is possible to see why this is so from very simple considerations. The backbone of a protein consists of peptide bonds (which can rotate fairly freely) plus two rotating bonds in each amino acid. even ignoring the amino acid side chains (which often have multiple rotatable bonds) even a dipeptide has 5 bonds where you have to explore the possible rotations to find the optimal configuration of the extremely simple molecule. Since proteins consist of between 50 and 2000 amino acids that leaves a gargantuan number of options to consider, even if we can ignore all the other things that matter.

And those other things do matter. A simple example is that the configuration at a specific bond in the backbone may depend on the spatial orientation of other bonds dozens of bonds away so every choice at one site depends on all the other choices on all the other bonds. Optimising one bond at a time just doesn't work. On top of that is the complexity of including the side chains. That makes the problem harger by another gargantuan degree even if you don't consider the specific possible interactions of those side chains with each other (which are know to be important in many real proteins in stabilising specific spatial structures.

On top of those complexities, real proteins fold themselves in the environment of the inside of cells where interactions with water matter. So you have to consider those interactions as well. And, on top of that, the machinery that makes proteins consists of other pieces of molecular machinery designed to force specific shapes to emerge (heat shock proteins or chaperones are known to do this job).

One way to simplify the task so its difficulty is apparent is to realise that a simple protein chain has an extraordinary number of possible ways to fold only one of which is the "right" way in a living system. The problem is not finding a possible structure, but the right structure. Given the almost-impossible-to-count number of options, it is beyond the capacity of computation to find the right one by any known search algorithm.

This is why large teams of professionals have failed over decades to find a good general approach even when using vast amounts of specific biological knowledge from known structures. It is simply not a problem that can be tackled by amateurs.

• When you talk about "choices" are you talking about quantum choices, where the system can jump into different states? Otherwise wouldn't the protein just wiggle around in a predictable classical manner until it gets stuck in a local minima? Dec 14 '20 at 16:46
• @zooby By "choices" I mean simple things like the angle at each rotatable bond. So quantum effects are not important and the complexity will be extremely high whether we worry about quantum effect or not. Dec 14 '20 at 17:28
• But my understanding is a protein doesn't make choices then, it just wiggles around according to the forces acting on it and the electric charges. In fact, worse than that, the protein itself is like a little machine that can move about into several configurations so it is not even a solid object. Dec 14 '20 at 23:38
• @zooby I'm using the word "choices" looseley. To model the protein you have to explore all the possible bond angles for every rotatable bond in the protein. I'm calling each possibility a "choice". For every combination of all the possible choices, you have to calculate the energy state and not just the local state around each bond, but the global state of the whole protein. And even that isn't enough as the global minimal energy might not be the configuration found in nature. Dec 15 '20 at 16:12
• But you still haven't told me how the protein itself explores all the possible bond angles. Dec 15 '20 at 19:33

In short: Joining amino acids to build proteins does not just assemble rigid bodies together.

Maybe you think it is joining a carboxylic acid and an amine to form an amide and to identify a conformation corresponding to the global energetic minimum around this unit. It surly was not this easy to enter successfully CASP14. Without intent to list all possible complications on the way, you may encounter additional problems:

• many of the essential $$\alpha$$-amino acids contain flexible chains. Their orientation, which may interfere with other chains of other amino acids nearby, equally contributes to the overall energy of the protein. Thus, it isn't only the angle $$\omega$$ within the amide group which has to find a / the optimum, equally $$\psi$$ in the back of the amide's NH.

(credit)

A contribution to simplify the problem however is experimental evidence what is most likely for the amino acids accessible as illustrated by the Ramachandran plot

(credit loc. cit.)

• a force field literally universal (UFF) covering all atoms may be too coarse to identify the globally best spatial arrangement. Some intramolecular angles and distances will be estimated to small, and some to big compared to the true values. Even more advanced ones which computationally are more costly, e.g. MMFF94, are based on experimentally determined data about small molecules, rather than proteins. Thus you likely start to parameterize / develop a new model to describe experimental evidence good enough without paying too much on computation and include results e.g., from dedicated protein NMR spectroscopy, protein crystallography and modeling.

• natural proteins not only are large (number of atoms, number of amino acids, conformational flexible side chains), their higher structure (e.g., hairpin loops, $$\beta$$-sheets) equally is affected by intra- and intermolecular interactions of the protein itself, but may enclose (metal) ions and water molecules. Contrary to an amide bond, their presence is not due to covalent bonds

One element preventing AlphaFold2 (this years winner of CASP) to identify a reasonable solution just by brute force is a layer of machine learning / deep learning. For example, if the unknown protein structure contains a sequence of Ala-Cys-Arg, data bases are queried for other (known) protein structures with this sequence. Their local structure for this very sequence is then used for the unknown protein structure as a start structure to be tested. If you have about an hour, Yannic Kilcher presents some of the theory used by AlphaFold2's predecessor in a video.

There are numerous projects related to protein folding e.g., on GitHub which both publish their code and provide access to data for training and testing, e.g., ProteinNet equally linking to the original CASP7 (2006) data set. The text based version is a tar.gz archive of 3.2 GB. The consultation of ChemSE's sibling site MatterModellingSE may be of help, too.

• What confuses me is that the question is posed in terms of the protein finding the minimum energy. Why would the protein (in real life) not just get stuck in a local mimnum? (Or perhaps a lot of proteins do but only the ones that work get stuck in the right local minimum). When a protein wiggles around it tries lots of combinations but at what point does it fix itself. How does it "know" it is in the right position? Dec 14 '20 at 16:44
• Does the protein fold in a classical way, or does it jump into diffrent configurations in a quantum way? Dec 14 '20 at 16:45
• I suppose the surrounding water molecules could knock it out of local minima until it found a lower energy state? Dec 14 '20 at 16:50
• @zooby Of course a protein structure may be stuck in a local minimum, the identification of a global minimum would require activation to leave this «pit» first. Assuming linear (instead of convergent) protein synthesis, the protein chain is exposed to other molecules (e.g., water) and will start to fold right there, without waiting for the whole sequence to be synthesized in fist place. This synchronicity may narrow the folding options, possibly excluding access to the global minimum. About water around and water trapped in a protein, see e.g. pnas.org/content/101/10/3325 . Dec 14 '20 at 21:41
• @zooby or this review publication: pubs.acs.org/doi/10.1021/acs.chemrev.5b00664 Dec 14 '20 at 21:48