SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2203.10446 · NeurIPS · 2021

A 3D Generative Model for Structure-Based Drug Design

Jian Peng, Shitong Luo, Jiaqi Guan, Jianzhu Ma

arXiv · PDF · Open in the Atlas

Code that ran

4 of 4 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; 4 failures of our instrument; 0 no recorded run), measured 2026-11-22; 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/2203.10446.json · badge: /api/ran/2203.10446.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
luost26/3d-generative-sbdd canonical (classifier label)
classifier basis: classifier_2025
4 ran · 0 no recorded run
FunctionStatusWhere it lives
concat_tensors_to_batch Ran
ran; our contract draft was wrong, not the code
luost26/3d-generative-sbdd/models/sample.py
code served (permissive licence) · get_code("b45191024f7c9733")
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

torch.manual_seed(0)

# Create a list of tensors with different sizes to split and concatenate
x_split = [
    torch.randn(2, 4),  # 2 samples, 4 features
    torch.randn(3, 4),  # 3 samples, 4 features
    torch.randn(1, 4),  # 1 sample, 4 features
]

ARGS = {
    "x_split": x_split,
}
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
random_roll_back Ran
ran; our contract draft was wrong, not the code
luost26/3d-generative-sbdd/sample.py
code served (permissive licence) · get_code("468257593ef53102")
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) and returned MockData. 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 random
import numpy as np

class MockData:
    def __init__(self):
        self.logp_history = np.array([0.5, 0.3, 0.2, 0.1])
        self.ligand_context_element = np.array([1, 2, 3, 4])
        self.ligand_context_feature_full = np.array([[0.1, 0.2, 0.3, 0.4],
                                                      [0.5, 0.6, 0.7, 0.8],
                                                      [0.9, 1.0, 1.1, 1.2],
                                                      [1.3, 1.4, 1.5, 1.6]])
        self.ligand_context_pos = np.array([[1.0, 2.0, 3.0],
                                            [4.0, 5.0, 6.0],
                                            [7.0, 8.0, 9.0],
                                            [10.0, 11.0, 12.0]])
        self.total_logp = np.sum(self.logp_history)
        self.average_logp = np.mean(self.logp_history)

data = MockData()

ARGS = {
    "data": data
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MockData — a MockData output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockData output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not 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
sample_init Ran
ran; our contract draft was wrong, not the code
luost26/3d-generative-sbdd/models/sample.py
code served (permissive licence) · get_code("41162e2f12e0b028")
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) 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 as nn
from torch_geometric.data import Data, Batch
import numpy as np

torch.manual_seed(0)
np.random.seed(0)

# Build a minimal model that satisfies the function's usage
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(10, 2)
    
    def forward(self, pos_query, protein_pos, protein_atom_feature, ligand_pos, 
                ligand_atom_feature, batch_query, batch_protein, batch_ligand):
        # pos_query: (num_query_points, 3)
        # Returns y_cls (num_query_points, num_classes) and y_ind (num_query_points, num_indices)
        batch_size = pos_query.size(0)
        y_cls = torch.randn(batch_size, 2)
        y_ind = torch.randn(batch_size, 3)
        return y_cls, y_ind

model = MinimalModel()

# Create sample data for 2 graphs
data_list = []
for graph_idx in range(2):
    # Protein data
    protein_pos = torch.randn(5, 3)  # 5 protein atoms, 3D positions
    protein_atom_feature = torch.randn(5, 4)  # 5 atoms, 4 features
    protein_element = torch.zeros(5, dtype=torch.long)
    
    # Ligand context data
    ligand_context_pos = torch.randn(3, 3)  # 3 ligand atoms, 3D positions
    ligand_context_feature_full = torch.randn(3, 4)  # 3 atoms, 4 features
    ligand_context_element = torch.zeros(3, dtype=torch.long)
    
    data = Data(
        protein_pos=protein_pos,
        protein_atom_feature=protein_atom_feature,
        protein_element=protein_element,
        ligand_context_pos=ligand_context_pos,
        ligand_context_feature_full=ligand_context_feature_full,
        ligand_context_element=ligand_context_element,
    )
    data_list.append(data)

# Create batch from data list
batch = Batch.from_data_list(data_list, follow_batch=['protein_element', 'ligand_context_element'])

ARGS = {
    'batch': batch,
    'model': model,
    'num_points': 10,
    'noise_std': 0.5,
    'follow_batch': ['protein_element', 'ligand_context_element']
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch, torch_geometric — 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
split_tensor_by_batch Ran
ran; our contract draft was wrong, not the code
luost26/3d-generative-sbdd/models/sample.py
code served (permissive licence) · get_code("c8e6ed243dd0c66b")
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 list. 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 as nn

torch.manual_seed(0)

# Create tensors
# x should be (N, ...) where N is the number of elements
# batch should be (B, ) or similar indexing tensor indicating which graph each element belongs to
x = torch.randn(10, 4)  # 10 elements, each with 4 features
batch = torch.tensor([0, 0, 1, 1, 1, 2, 2, 2, 2, 0])  # 10 elements assigned to 3 graphs (0, 1, 2)
num_graphs = None  # Will be inferred from batch.max() + 1

ARGS = {
    "x": x,
    "batch": batch,
    "num_graphs": num_graphs
}
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 list — a list 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

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 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 2 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
concat_tensors_to_batch
brick of this paper's assembly: helper
2 other papers
2 later
2305.07508 (2023-05)
MolDiff: Addressing the Atom-Bond Inconsistency Problem in 3D Molecule Diffusion Generation
2310.02553 (2023-10)
Full-Atom Protein Pocket Design via Iterative Refinement
split_tensor_by_batch
brick of this paper's assembly: helper
2 other papers
2 later
2305.07508 (2023-05)
MolDiff: Addressing the Atom-Bond Inconsistency Problem in 3D Molecule Diffusion Generation
2310.02553 (2023-10)
Full-Atom Protein Pocket Design via Iterative Refinement

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-22.

Repositories linked to this paper

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

Abstract

We study a fundamental problem in structure-based drug design -generating molecules that bind to specific protein binding sites. While we have witnessed the great success of deep generative models in drug design, the existing methods are mostly string-based or graph-based. They are limited by the lack of spatial information and thus unable to be applied to structure-based design tasks. Particularly, such models have no or little knowledge of how molecules interact with their target proteins exactly in 3D space. In this paper, we propose a 3D generative model that generates molecules given a designated 3D protein binding site. Specifically, given a binding site as the 3D context, our model estimates the probability density of atom's occurrences in 3D space -positions that are more likely to have atoms will be assigned higher probability. To generate 3D molecules, we propose an auto-regressive sampling scheme -atoms are sampled sequentially from the learned distribution until there is no room for new atoms. Combined with this sampling scheme, our model can generate valid and diverse molecules, which could be applicable to various structure-based molecular design tasks such as molecule sampling and linker design. Experimental results demonstrate that molecules sampled from our model exhibit high binding affinity to specific targets and good drug properties such as drug-likeness even if the model is not explicitly optimized for them.

For agents

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

get_harvested_code_for_paper("2203.10446")
get_code_for_paper("2203.10446")
have("2203.10446")

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

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

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

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

Connect an agent — have() is free.