Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect peptide structure from protein_test. #25

Closed
electronicsbyjulie opened this issue May 29, 2022 · 11 comments
Closed

Incorrect peptide structure from protein_test. #25

electronicsbyjulie opened this issue May 29, 2022 · 11 comments
Assignees
Labels
bug Something isn't working. CRITICAL Something is very wrong.

Comments

@electronicsbyjulie
Copy link
Contributor

./protest TTTTTTTTTTTTTTTTTTTTTTT

The result is a coiled strand where the atoms are too close together. This conformation would be impossible in a real protein.

polythreonine_wrong

There is a function call in protest.cpp to straighten the chain, but every iteration shows zero as the molecular energy, so no bonds are rotated.

Iteration 0
0 v. 0
0 vs. 0
Iteration 1
0 v. 0
0 vs. 0
Iteration 2
0 v. 0
0 vs. 0
Iteration 3
0 v. 0
0 vs. 0
Iteration 4
0 v. 0
0 vs. 0
Iteration 5
0 v. 0
0 vs. 0
...
@electronicsbyjulie electronicsbyjulie self-assigned this May 29, 2022
@electronicsbyjulie electronicsbyjulie added bug Something isn't working. invalid Issue is no longer relevant. labels May 29, 2022
electronicsbyjulie pushed a commit that referenced this issue May 29, 2022
electronicsbyjulie pushed a commit that referenced this issue May 29, 2022
electronicsbyjulie pushed a commit that referenced this issue May 29, 2022
@electronicsbyjulie
Copy link
Contributor Author

This is happening though.

mangled tyrosine

@electronicsbyjulie electronicsbyjulie added focus and removed invalid Issue is no longer relevant. labels May 30, 2022
@electronicsbyjulie
Copy link
Contributor Author

Alpha helices are not actually working.

@electronicsbyjulie
Copy link
Contributor Author

This is all kinds of wrong:
peptide_wrongness

@electronicsbyjulie
Copy link
Contributor Author

The floating side chains are happening because of the proline.

@electronicsbyjulie
Copy link
Contributor Author

The segfault that is currently failing protest:

clear; make; valgrind ./protest ARNDCEQGHILKMFPUSTWYV

==321411== Process terminating with default action of signal 11 (SIGSEGV)
==321411==  Access not within mapped region at address 0x54
==321411==    at 0x10E3D0: Atom::get_location() (atom.cpp:403)
==321411==    by 0x12E24F: AminoAcid::rotate_backbone_abs(bb_rot_dir, float) (aminoacid.cpp:933)
==321411==    by 0x12B9B5: AminoAcid::AminoAcid(char, AminoAcid*) (aminoacid.cpp:162)
==321411==    by 0x1301CF: Protein::add_residue(int, char) (protein.cpp:48)
==321411==    by 0x1305CB: Protein::add_sequence(char const*) (protein.cpp:103)
==321411==    by 0x10BCFF: main (protest.cpp:36)
==321411==  If you believe this happened as a result of a stack
==321411==  overflow in your program's main thread (unlikely but
==321411==  possible), you can try to increase the size of the
==321411==  main thread stack using the --main-stacksize= flag.
==321411==  The main thread stack size used in this run was 8388608.

@electronicsbyjulie
Copy link
Contributor Author

Though the side chains no longer float, their hydrogens are still coming up disembodied, and the heavy atoms are clashing pretty bad.

@electronicsbyjulie
Copy link
Contributor Author

The protein test is horribly broken. It is placing all of the N atoms at [0,0,0] and failing to bond each residue to the previous residue.

@electronicsbyjulie
Copy link
Contributor Author

The lack of correct atom names is causing a bunch of other problems.

To position the residues onto their previous residues, we can assume the following conditions to always be true:

  • The N of the current residue will be 1.32A from the previous residue's C;
  • The angle from prev.O - prev.C - curr.N will be 120 degrees;
  • The angle from prev.C - curr.N - curr.HN will be 120 degrees;
  • The angle from prev.O - curr.HN along the prev.C - curr.N axis will be 180 degrees.

Algorithmically, then, we can do something like:

  1. Get the curr.N - prev.C relative location and scale it to 1.32A.
  2. Move the entire current molecule so the N is now at that distance.
  3. Get the normal from the prev.CA - prev.C - prev.O plane.
  4. Get the angle along the normal of prev.O - prev.C - curr.N.
  5. Rotate the current molecule about the prev.C atom, using the normal as an axis, to get a 120 degree angle not clashing curr.N with prev.CA.
  6. Get the normal from the curr.HN - curr.N - curr.CA plane.
  7. Get the angle along the normal of prev.C - curr.N - curr.HN.
  8. Rotate the current molecule about the curr.N atom, using the normal as an axis, to get a 120 degree angle not clashing prev.C with curr.CA.
  9. Get the angle of curr.HN - prev.O along the prev.C - curr.N axis.
  10. Rotate the current molecule around curr.N to get 180 degrees.

But first, have to name all the atoms.

@electronicsbyjulie electronicsbyjulie added the CRITICAL Something is very wrong. label Jun 2, 2022
@electronicsbyjulie
Copy link
Contributor Author

Atom names are now working (checkins for #36).

electronicsbyjulie pushed a commit that referenced this issue Jun 3, 2022
electronicsbyjulie pushed a commit that referenced this issue Jun 3, 2022
electronicsbyjulie added a commit that referenced this issue Jun 3, 2022
electronicsbyjulie pushed a commit that referenced this issue Jun 3, 2022
electronicsbyjulie pushed a commit that referenced this issue Jun 3, 2022
electronicsbyjulie pushed a commit that referenced this issue Jun 3, 2022
@electronicsbyjulie
Copy link
Contributor Author

Peptide structures are coming along well. Histidine is causing a spatial disruption in chains, but only because the atom locations are not quite right. Proline is failing to attach to its preceding neighbor due to its lack of an HN atom.

electronicsbyjulie pushed a commit that referenced this issue Jun 4, 2022
@electronicsbyjulie electronicsbyjulie changed the title Incorrect peptide structure from protest. Incorrect peptide structure from protein_test. Jun 8, 2022
@electronicsbyjulie
Copy link
Contributor Author

Since protein_test is using SMILES strings to build amino acids, this ticket is now a duplicate of #5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. CRITICAL Something is very wrong.
Projects
None yet
Development

No branches or pull requests

1 participant