SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2412.18275 · ICLR · 2025

Learning to engineer protein flexibility

Josef Sivic, Petr Kouba, Joan Planas-Iglesias, Jiri Damborsky, Jiri Sedlar, Stanislav Mazurenko

arXiv · PDF · Open in the Atlas

Code that ran

9 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 9 failures of our instrument; 2 no recorded run), measured 2026-11-24; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2412.18275.json · badge: /api/ran/2412.18275.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
KoubaPetr/Flexpert marked official in Papers with Code
Papers with Code archive
9 ran · 2 no recorded run
FunctionStatusWhere it lives
_dihedrals Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
KoubaPetr/Flexpert/Flexpert-Design/src/models/pifold_model.py
code served (permissive licence) · get_code("af3beed9f1e84878")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (2, 4, 12) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# The function _dihedrals expects:
# - X: a 4D tensor of shape (B, N, something, 3) where it extracts [:, :, :3, :] 
#      and reshapes to (B, 3*N, 3)
# - dihedral_type: an integer (not used in the function body)
# - eps: a float for numerical stability

# Looking at the reshaping: X[:, :, :3, :].reshape(X.shape[0], 3 * X.shape[1], 3)
# This means X should have shape (B, N, 3+, 3) where the middle dimension gets expanded
# Let's use (B, N, 4, 3) so after taking [:, :, :3, :] we get (B, N, 3, 3)
# which reshapes to (B, 3*N, 3)

B = 2  # batch size
N = 4  # number of residues/atoms
n_atoms_per = 3  # atoms per residue (we'll pad to 4)
coord_dim = 3  # xyz coordinates

# Create X with shape (B, N, 4, 3)
# This will be reshaped to (B, 3*N, 3) = (2, 12, 3)
X = torch.randn(B, N, 4, 3)

# Verify the reshape works: (2, 4, 3, 3) -> take [:, :, :3, :] -> (2, 4, 3, 3) -> reshape to (2, 12, 3)
# After reshape to (2, 12, 3), we compute dihedrals
# dX has shape (2, 11, 3) after diff
# U has shape (2, 11, 3)
# u_0, u_1, u_2 have shapes (2, 9, 3), (2, 9, 3), (2, 9, 3)
# D output from cal_dihedral has shape (2, 9)
# After pad(D, (1, 2), 'constant', 0): shape (2, 12)
# After view to (2, 4, 3): shape (2, 4, 3)

dihedral_type = 0
eps = 1e-07

ARGS = {
    "X": X,
    "dihedral_type": dihedral_type,
    "eps": eps
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 4, 12) — shape (2, 4, 12) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_get_rbf Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
KoubaPetr/Flexpert/Flexpert-Design/src/models/pifold_model.py
code served (permissive licence) · get_code("fdbddecae670c752")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 3, 2, 16) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# A: batch_size=2, num_nodes=3, feat_dim=4
A = torch.randn(2, 3, 4)

# B: batch_size=2, num_nodes=5, feat_dim=4
B = torch.randn(2, 5, 4)

# E_idx: indices for gathering neighbors
# Shape: (batch_size, num_nodes_A, num_neighbors)
# Values should be valid indices into B's node dimension (0-4)
E_idx = torch.tensor([
    [[0, 1], [2, 3], [4, 0]],
    [[1, 2], [3, 4], [0, 1]]
])

num_rbf = 16

ARGS = {
    "A": A,
    "B": B,
    "E_idx": E_idx,
    "num_rbf": num_rbf
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 3, 2, 16) — shape (2, 3, 2, 16) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_normalize Ran
ran; our contract draft was wrong, not the code
KoubaPetr/Flexpert/Flexpert-Design/src/models/pifold_model.py
code served (permissive licence) · get_code("5e780a2c65bd8fa2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a small tensor with shape (2, 4) for testing
# The function uses torch.norm with dim=-1 and keepdim=True, 
# so we need a multi-dimensional tensor
tensor = torch.randn(2, 4)

# Define arguments for _normalize function
ARGS = {
    "tensor": tensor,
    "dim": -1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_orientations_coarse_gl_tuple Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
KoubaPetr/Flexpert/Flexpert-Design/src/models/pifold_model.py
code served (permissive licence) · get_code("253736ca102872e4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# X: shape (B, N, 4, 3) - batch of protein structures with B atoms, N residues, 4 atom types, 3 coords
# E_idx: shape (B, N, K) - neighbor indices, K neighbors per node
B, N, K = 2, 4, 3

X = torch.randn(B, N, 4, 3)
E_idx = torch.randint(0, N, (B, N, K))

# eps parameter
eps = 1e-6

ARGS = {
    "X": X,
    "E_idx": E_idx,
    "eps": eps,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_quaternions Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
KoubaPetr/Flexpert/Flexpert-Design/src/models/pifold_model.py
code served (permissive licence) · get_code("afae488bda159fe3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 4, 4, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# The function _quaternions takes a rotation matrix tensor R
# Looking at the function body:
# - R is indexed with R[:, :, :, i, j] suggesting shape (batch, ..., 3, 3) for rotation matrices
# - diag uses torch.diagonal with dim1=-2, dim2=-1
# - Operations preserve batch dimensions
# - The function expects 3x3 rotation matrices in the last two dimensions

# Create a small batch of rotation matrices
# Shape: (batch_size=2, spatial_dim1=4, spatial_dim2=4, 3, 3)
# This gives us a batch of 2 sets of 4x4 grids of 3x3 rotation matrices

batch_size = 2
spatial_h = 4
spatial_w = 4

# Create valid rotation matrices using QR decomposition
# Start with random matrices and orthogonalize them
random_mats = torch.randn(batch_size, spatial_h, spatial_w, 3, 3)
R_list = []
for b in range(batch_size):
    for h in range(spatial_h):
        for w in range(spatial_w):
            Q, _ = torch.linalg.qr(random_mats[b, h, w])
            R_list.append(Q)

R_list = torch.stack(R_list).reshape(batch_size, spatial_h, spatial_w, 3, 3)

ARGS = {
    "R": R_list
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 4, 4, 4) — shape (2, 4, 4, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_rbf Ran
ran; our contract draft was wrong, not the code
KoubaPetr/Flexpert/Flexpert-Design/src/models/pifold_model.py
code served (permissive licence) · get_code("459bd6692cfde12a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 3, 4, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# D should be a tensor of distances with shape that allows unsqueeze(-1)
# Looking at the function: D is unsqueezed to add a dimension, then compared with D_mu
# D_mu has shape [1, 1, 1, num_rbf], so D should have shape compatible for broadcasting
# A typical shape would be [batch, height, width] or similar
D = torch.randn(2, 3, 4)

# num_rbf is an integer specifying the number of RBF centers
num_rbf = 5

ARGS = {
    "D": D,
    "num_rbf": num_rbf,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 3, 4, 5) — shape (2, 3, 4, 5) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
cal_dihedral Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
KoubaPetr/Flexpert/Flexpert-Design/src/models/pifold_model.py
code served (permissive licence) · get_code("64ff3a8d5e550e4e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 2) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# X should be a tensor of shape (batch_size, num_atoms, 3)
# The function computes dihedral angles from atomic coordinates
# We need at least 4 atoms (indices 0,1,2,3) to compute one dihedral angle
# batch_size=2, num_atoms=5, coordinates=3D
X = torch.randn(2, 5, 3)

ARGS = {
    "X": X,
    "eps": 1e-07,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 2) — shape (2, 2) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
gather_nodes Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
KoubaPetr/Flexpert/Flexpert-Design/src/models/pifold_model.py
code served (permissive licence) · get_code("d1c36b6577e46ad5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 3, 2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Analyze the function:
# - nodes: used with .size(2) to get feature dimension, and torch.gather operates on dim 1
#   Shape needs to be (batch, num_nodes, features)
# - neighbor_idx: used with .view, .unsqueeze, .expand, and .shape
#   Shape needs to be (batch, num_neighbors, k) where k is some dimension

# Create nodes tensor: (batch_size=2, num_nodes=5, features=4)
nodes = torch.randn(2, 5, 4)

# Create neighbor_idx tensor: (batch_size=2, num_neighbors=3, k=2)
# This should contain valid indices into the num_nodes dimension (0-4)
neighbor_idx = torch.randint(0, 5, (2, 3, 2))

ARGS = {
    "nodes": nodes,
    "neighbor_idx": neighbor_idx,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 3, 2, 4) — shape (2, 3, 2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
nan_to_num Ran
ran; our contract draft was wrong, not the code
KoubaPetr/Flexpert/Flexpert-Design/src/models/pifold_model.py
code served (permissive licence) · get_code("79545090ec5f8fe4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a small tensor with some NaN values
tensor = torch.tensor([[1.0, float('nan'), 3.0, float('nan')],
                       [5.0, 6.0, float('nan'), 8.0]], dtype=torch.float32)

ARGS = {
    "tensor": tensor,
    "nan": 0.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
PiFold_Model Not yet run
unverified (harvested, no recorded run)
KoubaPetr/Flexpert/Flexpert-Design/src/models/pifold_model.py
code served (permissive licence) · get_code("1120084014594842")
How it ran

no invocation recorded.

gather_edges Not yet run
unverified (harvested, no recorded run)
KoubaPetr/Flexpert/Flexpert-Design/src/models/pifold_model.py
code served (permissive licence) · get_code("69de587d81783208")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 2 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 2 later) and 9 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
gather_edges
brick of this paper's assembly: helper
1 other paper
1 later
2601.19232 (2026-01)
Structure-based RNA Design by Step-wise Optimization of Latent Diffusion Model
nan_to_num
brick of this paper's assembly: helper
1 other paper
1 later
2601.19232 (2026-01)
Structure-based RNA Design by Step-wise Optimization of Latent Diffusion Model

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Generative machine learning models are increasingly being used to design novel proteins for therapeutic and biotechnological applications. However, the current methods mostly focus on the design of proteins with a fixed backbone structure, which leads to their limited ability to account for protein flexibility, one of the crucial properties for protein function. Learning to engineer protein flexibility is problematic because the available data are scarce, heterogeneous, and costly to obtain using computational as well as experimental methods. Our contributions to address this problem are three-fold. First, we comprehensively compare methods for quantifying protein flexibility and identify data relevant to learning. Second, we design and train flexibility predictors utilizing sequential or both sequential and structural information on the input. We overcome the data scarcity issue by leveraging a pre-trained protein language model. Third, we introduce a method for fine-tuning a protein inverse folding model to steer it toward desired flexibility in specified regions. We demonstrate that our method Flexpert-Design enables guidance of inverse folding models toward increased flexibility. This opens up new possibilities for protein flexibility engineering and the development of proteins with enhanced biological activities.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2412.18275")
get_code_for_paper("2412.18275")
have("2412.18275")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2412.18275.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2412.18275.svg)](https://syntology.ai/paper/2412.18275)

Connect an agent — have() is free.