{
  "id": 568512,
  "title": "[Draft] RNA 3d structure via minizing energy for fape(Frame Aligned Point Error) and base-pairing",
  "url": "/competitions/stanford-rna-3d-folding/discussion/568512",
  "author_name": "",
  "post_date": "2025-03-16T10:43:01.090687700Z",
  "votes": 20,
  "comment_count": 10,
  "views": 0,
  "content": "<p>a simplified post-processing module (based on alphafold2 and drfold2) for RNA 3d structure prediction, minizing energy for fape (Frame Aligned Point Error) and base-pairing</p>\n<p>to do:</p>\n<ul>\n<li>notebook link<br>\n<a href=\"https://www.kaggle.com/code/hengck23/draft-rna-3d-minizing-energy-for-fape-basepair\" target=\"_blank\">https://www.kaggle.com/code/hengck23/draft-rna-3d-minizing-energy-for-fape-basepair</a><br>\n(give me some time to clean up my code)</li>\n</ul>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ff38183fbc3e26dfec10fa7537d7aeb2d%2FSelection_067.png?generation=1742121627377570&amp;alt=media\" alt=\"\"></p>\n<p>suggestion:</p>\n<ul>\n<li><p>the use of pytorch optimize to replace scipy l_bfgs<br>\n(but note this needs 64bit float, not sure if kaggle gpu is good for this)</p></li>\n<li><p>it is reported on most papers that an ensemble of distance maps from different net can improve results</p></li>\n</ul>\n<p>open question: </p>\n<ul>\n<li><p>this improve INF metric score (better pairing) but not necessary Tm score. This is because we stop optimizing when nucleotide-pair is sufficiently close (and not necessary to the ground truth location) . How to solve this?</p></li>\n<li><p>should we use C1 (kaggle backbone) in local frame?</p></li>\n</ul>\n<hr>\n<p>reference:<br>\n[1] <a href=\"https://github.com/leeyang/DRfold2/blob/main/PotentialFold/Optimization.py\" target=\"_blank\">https://github.com/leeyang/DRfold2/blob/main/PotentialFold/Optimization.py</a></p>",
  "messages": [
    {
      "id": "3151137",
      "postDate": "03/16/2025 10:43:01",
      "content": "<p>a simplified post-processing module (based on alphafold2 and drfold2) for RNA 3d structure prediction, minizing energy for fape (Frame Aligned Point Error) and base-pairing</p>\n<p>to do:</p>\n<ul>\n<li>notebook link<br>\n<a href=\"https://www.kaggle.com/code/hengck23/draft-rna-3d-minizing-energy-for-fape-basepair\" target=\"_blank\">https://www.kaggle.com/code/hengck23/draft-rna-3d-minizing-energy-for-fape-basepair</a><br>\n(give me some time to clean up my code)</li>\n</ul>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ff38183fbc3e26dfec10fa7537d7aeb2d%2FSelection_067.png?generation=1742121627377570&amp;alt=media\" alt=\"\"></p>\n<p>suggestion:</p>\n<ul>\n<li><p>the use of pytorch optimize to replace scipy l_bfgs<br>\n(but note this needs 64bit float, not sure if kaggle gpu is good for this)</p></li>\n<li><p>it is reported on most papers that an ensemble of distance maps from different net can improve results</p></li>\n</ul>\n<p>open question: </p>\n<ul>\n<li><p>this improve INF metric score (better pairing) but not necessary Tm score. This is because we stop optimizing when nucleotide-pair is sufficiently close (and not necessary to the ground truth location) . How to solve this?</p></li>\n<li><p>should we use C1 (kaggle backbone) in local frame?</p></li>\n</ul>\n<hr>\n<p>reference:<br>\n[1] <a href=\"https://github.com/leeyang/DRfold2/blob/main/PotentialFold/Optimization.py\" target=\"_blank\">https://github.com/leeyang/DRfold2/blob/main/PotentialFold/Optimization.py</a></p>",
      "rawMarkdown": "a simplified post-processing module (based on alphafold2 and drfold2) for RNA 3d structure prediction, minizing energy for fape (Frame Aligned Point Error) and base-pairing\n\nto do:\n- notebook link\nhttps://www.kaggle.com/code/hengck23/draft-rna-3d-minizing-energy-for-fape-basepair\n(give me some time to clean up my code)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ff38183fbc3e26dfec10fa7537d7aeb2d%2FSelection_067.png?generation=1742121627377570&alt=media)\n\n\nsuggestion:\n- the use of pytorch optimize to replace scipy l_bfgs\n(but note this needs 64bit float, not sure if kaggle gpu is good for this)\n\n- it is reported on most papers that an ensemble of distance maps from different net can improve results\n\n\nopen question: \n\n- this improve INF metric score (better pairing) but not necessary Tm score. This is because we stop optimizing when nucleotide-pair is sufficiently close (and not necessary to the ground truth location) . How to solve this?\n\n- should we use C1 (kaggle backbone) in local frame?\n\n\n---\n\nreference:\n[1] https://github.com/leeyang/DRfold2/blob/main/PotentialFold/Optimization.py",
      "votes": null
    },
    {
      "id": "3151194",
      "postDate": "03/16/2025 12:05:47",
      "content": "<p>simple explanation to begineers on what the code is doing:<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F9e28d4e7a6e6a436c678c02b15f43b23%2FSelection_068.png?generation=1742126745718302&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "simple explanation to begineers on what the code is doing:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F9e28d4e7a6e6a436c678c02b15f43b23%2FSelection_068.png?generation=1742126745718302&alt=media)",
      "votes": null
    },
    {
      "id": "3151280",
      "postDate": "03/16/2025 14:12:48",
      "content": "<p>I tried some thermodynamics features and modules, but it doesn't quite work for me.</p>",
      "rawMarkdown": "I tried some thermodynamics features and modules, but it doesn't quite work for me.",
      "votes": null
    },
    {
      "id": "3151286",
      "postDate": "03/16/2025 14:19:59",
      "content": "<p>this is not my code. i refractor from drfold2.<br>\nthey are using potential energy for minimzation.</p>\n<p>i tried with casp15 targets, they work well (tm score &gt;0.5)</p>",
      "rawMarkdown": "this is not my code. i refractor from drfold2.\nthey are using potential energy for minimzation.\n\ni tried with casp15 targets, they work well (tm score >0.5)",
      "votes": null
    },
    {
      "id": "3151287",
      "postDate": "03/16/2025 14:23:36",
      "content": "<p>Wow, I have to think about it🤔</p>",
      "rawMarkdown": "Wow, I have to think about it🤔",
      "votes": null
    },
    {
      "id": "3151298",
      "postDate": "03/16/2025 14:34:47",
      "content": "<p>i am not an expert, but they really hand-craft quite a number of conditions, e.g. bond, frame atom torsion, etc …</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F72bdeac3cee63a193327a55a529acc71%2FSelection_070.png?generation=1742135685078364&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "i am not an expert, but they really hand-craft quite a number of conditions, e.g. bond, frame atom torsion, etc ...\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F72bdeac3cee63a193327a55a529acc71%2FSelection_070.png?generation=1742135685078364&alt=media)",
      "votes": null
    },
    {
      "id": "3151703",
      "postDate": "03/17/2025 02:56:39",
      "content": "<p>L-bfgs is very time consuming. i discover a shortcut.</p>\n<ul>\n<li>drfold model are very small (15mb) and very fast.</li>\n<li>just need to run many of them, about 50 to 100, each is trained slightly differently, etc<br>\n(github repo actually provide 100 of them)</li>\n<li>score each model output with the energy function.</li>\n<li>select the best energy</li>\n</ul>\n<p>about converting from frame (P,C4,N1/N9) to kaggle C1', there are 2 solution:</p>\n<ul>\n<li>use template that has local fixed location of all atoms in base</li>\n<li>train a  frame (P,C4,N1/N9) to C1' predictor (should be very small MLP)</li>\n</ul>",
      "rawMarkdown": "L-bfgs is very time consuming. i discover a shortcut.\n- drfold model are very small (15mb) and very fast.\n- just need to run many of them, about 50 to 100, each is trained slightly differently, etc\n(github repo actually provide 100 of them)\n- score each model output with the energy function.\n- select the best energy\n\nabout converting from frame (P,C4,N1/N9) to kaggle C1', there are 2 solution:\n- use template that has local fixed location of all atoms in base\n- train a  frame (P,C4,N1/N9) to C1' predictor (should be very small MLP)",
      "votes": null
    },
    {
      "id": "3153595",
      "postDate": "03/19/2025 02:07:42",
      "content": "<p>related:<br>\nDeepFoldRNA : De Novo RNA Tertiary Structure Prediction at Atomic Resolution Using<br>\nGeometric Potentials from Deep Learning from zhang server<br>\n<a href=\"https://www.biorxiv.org/content/10.1101/2022.05.15.491755v1\" target=\"_blank\">https://www.biorxiv.org/content/10.1101/2022.05.15.491755v1</a></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fdb9247d8ffb41a0449d75a9de1220d9e%2FSelection_088.png?generation=1742350060629512&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F53776220a1ba37ca3a818d73dd5d1bef%2FSelection_089.png?generation=1742350263296763&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fccec2c3aab7659e780931ef70b258dff%2FSelection_090.png?generation=1742350313056715&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "related:\nDeepFoldRNA : De Novo RNA Tertiary Structure Prediction at Atomic Resolution Using\nGeometric Potentials from Deep Learning from zhang server\nhttps://www.biorxiv.org/content/10.1101/2022.05.15.491755v1\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fdb9247d8ffb41a0449d75a9de1220d9e%2FSelection_088.png?generation=1742350060629512&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F53776220a1ba37ca3a818d73dd5d1bef%2FSelection_089.png?generation=1742350263296763&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fccec2c3aab7659e780931ef70b258dff%2FSelection_090.png?generation=1742350313056715&alt=media)",
      "votes": null
    },
    {
      "id": "3154954",
      "postDate": "03/20/2025 14:47:59",
      "content": "<p>Have you made any advancements when converting from (P,C4,N1/N9) to C1? I am currently working with \"typical\" distances between the C1 atom and the three others and trying to find the point that minimizes the loss in terms of placing C1 at the right distance to the three others. It seems too simplistic, but I cannot understand much of what is published on the subject.</p>",
      "rawMarkdown": "Have you made any advancements when converting from (P,C4,N1/N9) to C1? I am currently working with \"typical\" distances between the C1 atom and the three others and trying to find the point that minimizes the loss in terms of placing C1 at the right distance to the three others. It seems too simplistic, but I cannot understand much of what is published on the subject.",
      "votes": null
    },
    {
      "id": "3155391",
      "postDate": "03/21/2025 01:42:27",
      "content": "<p>you have a few options:</p>\n<ol>\n<li><p>since drfold submit to casp, they must be about to produce all atoms location. you can go through their code. you can ask chatgpt to read their code for an answer, etc</p></li>\n<li><p>you can train a layer to do the prediction/conversion.</p></li>\n</ol>\n<p>3, \"typical\" distance, which you have already done. this is my current temporaril solution and also the drfold code.</p>",
      "rawMarkdown": "you have a few options:\n1. since drfold submit to casp, they must be about to produce all atoms location. you can go through their code. you can ask chatgpt to read their code for an answer, etc\n\n2. you can train a layer to do the prediction/conversion.\n\n3, \"typical\" distance, which you have already done. this is my current temporaril solution and also the drfold code.",
      "votes": null
    },
    {
      "id": "3158561",
      "postDate": "03/24/2025 16:56:25",
      "content": "<p>thanks for your sol</p>",
      "rawMarkdown": "thanks for your sol",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3151194,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "03/16/2025 12:05:47",
      "content": "<p>simple explanation to begineers on what the code is doing:<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F9e28d4e7a6e6a436c678c02b15f43b23%2FSelection_068.png?generation=1742126745718302&amp;alt=media\" alt=\"\"></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 3151280,
      "author_name": "sweetyheehee",
      "author_url": "",
      "post_date": "03/16/2025 14:12:48",
      "content": "<p>I tried some thermodynamics features and modules, but it doesn't quite work for me.</p>",
      "votes": null,
      "replies": [
        {
          "id": 3151286,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "03/16/2025 14:19:59",
          "content": "<p>this is not my code. i refractor from drfold2.<br>\nthey are using potential energy for minimzation.</p>\n<p>i tried with casp15 targets, they work well (tm score &gt;0.5)</p>",
          "votes": null,
          "replies": [
            {
              "id": 3151287,
              "author_name": "sweetyheehee",
              "author_url": "",
              "post_date": "03/16/2025 14:23:36",
              "content": "<p>Wow, I have to think about it🤔</p>",
              "votes": null,
              "replies": []
            },
            {
              "id": 3151298,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "03/16/2025 14:34:47",
              "content": "<p>i am not an expert, but they really hand-craft quite a number of conditions, e.g. bond, frame atom torsion, etc …</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F72bdeac3cee63a193327a55a529acc71%2FSelection_070.png?generation=1742135685078364&amp;alt=media\" alt=\"\"></p>",
              "votes": null,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 3151703,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "03/17/2025 02:56:39",
      "content": "<p>L-bfgs is very time consuming. i discover a shortcut.</p>\n<ul>\n<li>drfold model are very small (15mb) and very fast.</li>\n<li>just need to run many of them, about 50 to 100, each is trained slightly differently, etc<br>\n(github repo actually provide 100 of them)</li>\n<li>score each model output with the energy function.</li>\n<li>select the best energy</li>\n</ul>\n<p>about converting from frame (P,C4,N1/N9) to kaggle C1', there are 2 solution:</p>\n<ul>\n<li>use template that has local fixed location of all atoms in base</li>\n<li>train a  frame (P,C4,N1/N9) to C1' predictor (should be very small MLP)</li>\n</ul>",
      "votes": null,
      "replies": [
        {
          "id": 3154954,
          "author_name": "olemagnushiback",
          "author_url": "",
          "post_date": "03/20/2025 14:47:59",
          "content": "<p>Have you made any advancements when converting from (P,C4,N1/N9) to C1? I am currently working with \"typical\" distances between the C1 atom and the three others and trying to find the point that minimizes the loss in terms of placing C1 at the right distance to the three others. It seems too simplistic, but I cannot understand much of what is published on the subject.</p>",
          "votes": null,
          "replies": [
            {
              "id": 3155391,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "03/21/2025 01:42:27",
              "content": "<p>you have a few options:</p>\n<ol>\n<li><p>since drfold submit to casp, they must be about to produce all atoms location. you can go through their code. you can ask chatgpt to read their code for an answer, etc</p></li>\n<li><p>you can train a layer to do the prediction/conversion.</p></li>\n</ol>\n<p>3, \"typical\" distance, which you have already done. this is my current temporaril solution and also the drfold code.</p>",
              "votes": null,
              "replies": [
                {
                  "id": 3158561,
                  "author_name": "nguyencongminh",
                  "author_url": "",
                  "post_date": "03/24/2025 16:56:25",
                  "content": "<p>thanks for your sol</p>",
                  "votes": null,
                  "replies": []
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "id": 3153595,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "03/19/2025 02:07:42",
      "content": "<p>related:<br>\nDeepFoldRNA : De Novo RNA Tertiary Structure Prediction at Atomic Resolution Using<br>\nGeometric Potentials from Deep Learning from zhang server<br>\n<a href=\"https://www.biorxiv.org/content/10.1101/2022.05.15.491755v1\" target=\"_blank\">https://www.biorxiv.org/content/10.1101/2022.05.15.491755v1</a></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fdb9247d8ffb41a0449d75a9de1220d9e%2FSelection_088.png?generation=1742350060629512&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F53776220a1ba37ca3a818d73dd5d1bef%2FSelection_089.png?generation=1742350263296763&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fccec2c3aab7659e780931ef70b258dff%2FSelection_090.png?generation=1742350313056715&amp;alt=media\" alt=\"\"></p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "3151137": "a simplified post-processing module (based on alphafold2 and drfold2) for RNA 3d structure prediction, minizing energy for fape (Frame Aligned Point Error) and base-pairing\n\nto do:\n- notebook link\nhttps://www.kaggle.com/code/hengck23/draft-rna-3d-minizing-energy-for-fape-basepair\n(give me some time to clean up my code)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ff38183fbc3e26dfec10fa7537d7aeb2d%2FSelection_067.png?generation=1742121627377570&alt=media)\n\n\nsuggestion:\n- the use of pytorch optimize to replace scipy l_bfgs\n(but note this needs 64bit float, not sure if kaggle gpu is good for this)\n\n- it is reported on most papers that an ensemble of distance maps from different net can improve results\n\n\nopen question: \n\n- this improve INF metric score (better pairing) but not necessary Tm score. This is because we stop optimizing when nucleotide-pair is sufficiently close (and not necessary to the ground truth location) . How to solve this?\n\n- should we use C1 (kaggle backbone) in local frame?\n\n\n---\n\nreference:\n[1] https://github.com/leeyang/DRfold2/blob/main/PotentialFold/Optimization.py",
    "3151194": "simple explanation to begineers on what the code is doing:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F9e28d4e7a6e6a436c678c02b15f43b23%2FSelection_068.png?generation=1742126745718302&alt=media)",
    "3151280": "I tried some thermodynamics features and modules, but it doesn't quite work for me.",
    "3151286": "this is not my code. i refractor from drfold2.\nthey are using potential energy for minimzation.\n\ni tried with casp15 targets, they work well (tm score >0.5)",
    "3151287": "Wow, I have to think about it🤔",
    "3151298": "i am not an expert, but they really hand-craft quite a number of conditions, e.g. bond, frame atom torsion, etc ...\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F72bdeac3cee63a193327a55a529acc71%2FSelection_070.png?generation=1742135685078364&alt=media)",
    "3151703": "L-bfgs is very time consuming. i discover a shortcut.\n- drfold model are very small (15mb) and very fast.\n- just need to run many of them, about 50 to 100, each is trained slightly differently, etc\n(github repo actually provide 100 of them)\n- score each model output with the energy function.\n- select the best energy\n\nabout converting from frame (P,C4,N1/N9) to kaggle C1', there are 2 solution:\n- use template that has local fixed location of all atoms in base\n- train a  frame (P,C4,N1/N9) to C1' predictor (should be very small MLP)",
    "3153595": "related:\nDeepFoldRNA : De Novo RNA Tertiary Structure Prediction at Atomic Resolution Using\nGeometric Potentials from Deep Learning from zhang server\nhttps://www.biorxiv.org/content/10.1101/2022.05.15.491755v1\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fdb9247d8ffb41a0449d75a9de1220d9e%2FSelection_088.png?generation=1742350060629512&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F53776220a1ba37ca3a818d73dd5d1bef%2FSelection_089.png?generation=1742350263296763&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fccec2c3aab7659e780931ef70b258dff%2FSelection_090.png?generation=1742350313056715&alt=media)",
    "3154954": "Have you made any advancements when converting from (P,C4,N1/N9) to C1? I am currently working with \"typical\" distances between the C1 atom and the three others and trying to find the point that minimizes the loss in terms of placing C1 at the right distance to the three others. It seems too simplistic, but I cannot understand much of what is published on the subject.",
    "3155391": "you have a few options:\n1. since drfold submit to casp, they must be about to produce all atoms location. you can go through their code. you can ask chatgpt to read their code for an answer, etc\n\n2. you can train a layer to do the prediction/conversion.\n\n3, \"typical\" distance, which you have already done. this is my current temporaril solution and also the drfold code.",
    "3158561": "thanks for your sol"
  },
  "source": "meta"
}