SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.07508 · 2023

MolDiff: Addressing the Atom-Bond Inconsistency Problem in 3D Molecule Diffusion Generation

arXiv · PDF · Open in the Atlas

Code that ran

10 of 15 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 4 have no contract verdict; 6 failures of our instrument; 5 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/2305.07508.json · badge: /api/ran/2305.07508.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
pengxingang/moldiff canonical (classifier label)
classifier basis: census
10 ran · 5 no recorded run
FunctionStatusWhere it lives
concat_tensors_to_batch Ran
ran; our contract draft was wrong, not the code
pengxingang/moldiff/models/common.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
get_logger Ran
ran; our contract draft was wrong, not the code
pengxingang/moldiff/utils/misc.py
code served (permissive licence) · get_code("faa72a1daab22e92")
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 Logger. 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 os
import logging
import tempfile

# Create a temporary directory for log files
log_dir = tempfile.mkdtemp()

ARGS = {
    "name": "test_logger",
    "log_dir": log_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Logger — a Logger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Logger 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
index_to_log_onehot Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
pengxingang/moldiff/models/diffusion.py
pointer only (licence: MIT); the stored copy get_code serves, from bytedance/decompdiff, is pointer only (licence: NOASSERTION) · get_code("18603a28414ef5ca")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from bytedance/decompdiff, and GitHub could not classify the licence of that repository (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_config Ran
ran; our contract draft was wrong, not the code
pengxingang/moldiff/utils/misc.py
pointer only (licence: MIT); the stored copy get_code serves, from YangLing0818/BindDM, is pointer only (licence: NONE) · get_code("3273bb34dd3b46b9")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from YangLing0818/BindDM, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_train_config_from_ckpt Ran
ran on a synthesized input
pengxingang/moldiff/utils/misc.py
code served (permissive licence) · get_code("c715e104f5767155")
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 EasyDict. 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 os
import tempfile
import yaml
from easydict import EasyDict

# Create a temporary directory with a checkpoint and config file
temp_dir = tempfile.mkdtemp()

# Create a minimal YAML config file
config_data = {
    'model': 'test_model',
    'learning_rate': 0.001,
    'batch_size': 32
}

config_file_path = os.path.join(temp_dir, 'config.yaml')
with open(config_file_path, 'w') as f:
    yaml.dump(config_data, f)

# Create a dummy checkpoint file
ckpt_file_path = os.path.join(temp_dir, 'checkpoint.pt')
with open(ckpt_file_path, 'w') as f:
    f.write('dummy checkpoint')

ARGS = {
    'ckpt_path': ckpt_file_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
easydict, yaml — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EasyDict — a EasyDict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a EasyDict 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
log_1_min_a Ran
ran on a synthesized input
pengxingang/moldiff/models/diffusion.py
code served (permissive licence) · get_code("30f3953afd523b99")
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 ndarray, ndim 1, dtype family float, shape (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 numpy as np

def log_1_min_a(a):
    return np.log(1 - np.exp(a) + 1e-40)

# The function takes a single parameter 'a' which is used in:
# - np.exp(a): expects array-like input
# - 1 - np.exp(a): arithmetic operations
# - np.log(...): expects array-like input
# So 'a' should be a numpy array with values that keep 1 - np.exp(a) positive

# Create a small numpy array with values in a range that makes sense
# We want 1 - np.exp(a) > 0, which means np.exp(a) < 1, so a < 0
a_val = np.array([-2.0, -1.5, -1.0, -0.5])

ARGS = {
    "a": a_val
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (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
single_bond_only Ran
ran on a synthesized input
pengxingang/moldiff/utils/edm_bond.py
code served (permissive licence) · get_code("6f1c22e4e8037949")
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 int, ndim 0, dtype family int, shape () 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 numpy as np

torch.manual_seed(0)

ARGS = {
    "threshold": 10,
    "length": 8,
    "margin1": 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () 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
split_tensor_by_batch Ran
ran; our contract draft was wrong, not the code
pengxingang/moldiff/models/common.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
split_tensor_to_segments Ran
ran; our contract draft was wrong, not the code
pengxingang/moldiff/models/common.py
pointer only (licence: MIT); the stored copy get_code serves, from zaixizhang/FAIR, is pointer only (licence: NONE) · get_code("7c93fe70a4d7126a")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from zaixizhang/FAIR, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

to_torch_const Ran
ran on a synthesized input
pengxingang/moldiff/models/diffusion.py
code served (permissive licence) · get_code("0a49094d58d6a447")
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 Parameter, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 numpy as np

torch.manual_seed(0)

# The function to_torch_const takes a single parameter x
# It expects x to be a numpy array (since it calls torch.from_numpy(x))
# and converts it to a torch.nn.Parameter

# Create a small numpy array
x = np.random.randn(2, 4).astype(np.float32)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Parameter, ndim 2, dtype family float — no output shape is stated: observe_signature.py recorded Tensor ndim 2, which disagrees with the fixture run
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
geom_predictor Not yet run
unverified (harvested, no recorded run)
pengxingang/moldiff/utils/edm_bond.py
pointer only (licence: MIT); the stored copy get_code serves, from mninniri/GrIDDD, is pointer only (licence: NONE) · get_code("ab8617fd28b92b3c")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from mninniri/GrIDDD, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_bond_order Not yet run
unverified (harvested, no recorded run)
pengxingang/moldiff/utils/edm_bond.py
pointer only (licence: MIT); the stored copy get_code serves, from mninniri/GrIDDD, is pointer only (licence: NONE) · get_code("8472ecb13cf2144c")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from mninniri/GrIDDD, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_drug_chem Not yet run
unverified (harvested, no recorded run)
pengxingang/moldiff/utils/evaluation.py
code served (permissive licence) · get_code("96ba074cd96541f4")
How it ran

no invocation recorded.

get_global_3d Not yet run
unverified (harvested, no recorded run)
pengxingang/moldiff/utils/evaluation.py
code served (permissive licence) · get_code("3b01835f6b41568e")
How it ran

no invocation recorded.

torchify_dict Not yet run
unverified (harvested, no recorded run)
pengxingang/moldiff/utils/data.py
pointer only (licence: MIT); the stored copy get_code serves, from BLEACH366/EvoEGF-Mol, is pointer only (licence: GPL-3.0) · get_code("5f7183207256b0a3")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from BLEACH366/EvoEGF-Mol, and GPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 9 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 9 later) and 6 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
torchify_dict 11 other papers
11 later
2310.02553 (2023-10)
Full-Atom Protein Pocket Design via Iterative Refinement
2402.18583 (2024-02)
Binding-Adaptive Diffusion Models for Structure-Based Drug Design
2403.07902 (2024-03)
DECOMPDIFF: Diffusion Models with Decomposed Priors for Structure-Based Drug Design
and 8 more not named here
concat_tensors_to_batch 2 other papers
1 dated earlier, 1 later
2203.10446 (2022-03)
A 3D Generative Model for Structure-Based Drug Design
2310.02553 (2023-10)
Full-Atom Protein Pocket Design via Iterative Refinement
geom_predictor 2 other papers
1 dated earlier, 1 later
2302.09048 (2023-02)
MiDi: Mixed Graph and 3D Denoising Diffusion for Molecule Generation
2506.15725 (2025-06)
Graph Diffusion that can Insert and Delete
get_bond_order 2 other papers
1 dated earlier, 1 later
2302.09048 (2023-02)
MiDi: Mixed Graph and 3D Denoising Diffusion for Molecule Generation
2506.15725 (2025-06)
Graph Diffusion that can Insert and Delete
split_tensor_by_batch 2 other papers
1 dated earlier, 1 later
2203.10446 (2022-03)
A 3D Generative Model for Structure-Based Drug Design
2310.02553 (2023-10)
Full-Atom Protein Pocket Design via Iterative Refinement
get_logger 1 other paper
1 later
2402.18583 (2024-02)
Binding-Adaptive Diffusion Models for Structure-Based Drug Design
index_to_log_onehot 1 other paper
1 later
2403.07902 (2024-03)
DECOMPDIFF: Diffusion Models with Decomposed Priors for Structure-Based Drug Design
load_config 1 other paper
1 later
2402.18583 (2024-02)
Binding-Adaptive Diffusion Models for Structure-Based Drug Design
split_tensor_to_segments 1 other paper
1 later
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

Deep generative models have recently achieved superior performance in 3D molecule generation. Most of them first generate atoms and then add chemical bonds based on the generated atoms in a post-processing manner. However, there might be no corresponding bond solution for the temporally generated atoms as their locations are generated without considering potential bonds. We define this problem as the atom-bond inconsistency problem and claim it is the main reason for current approaches to generating unrealistic 3D molecules. To overcome this problem, we propose a new diffusion model called MolDiff which can generate atoms and bonds simultaneously while still maintaining their consistency by explicitly modeling the dependence between their relationships. We evaluated the generation ability of our proposed model and the quality of the generated molecules using criteria related to both geometry and chemical properties. The empirical studies showed that our model outperforms previous approaches, achieving a three-fold improvement in success rate and generating molecules with significantly better quality.

For agents

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

get_harvested_code_for_paper("2305.07508")
get_code_for_paper("2305.07508")
have("2305.07508")

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

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

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

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

Connect an agent — have() is free.