Skip to content

Fix TPSA contributions for sulfur and phosphorus in three-membered rings - #1347

Merged
johnmay merged 1 commit into
cdk:mainfrom
vera-rubin:fix/tpsa-small-rings
Oct 17, 2026
Merged

johnmay merged 1 commit into
cdk:mainfrom
vera-rubin:fix/tpsa-small-rings

Conversation

@vera-rubin

Copy link
Copy Markdown
Contributor

With default settings, TPSADescriptor returns 0.0 for both C1CS1 and CP1CC1. Ertl's Table 1 gives sulfur and phosphorus contributions of 25.30 Ų and 13.59 Ų, respectively, without a separate three-membered-ring type for either element.

var parser = new SmilesParser(SilentChemObjectBuilder.getInstance());
for (String smiles : new String[]{"C1CS1", "CP1CC1"})
    System.out.println(new TPSADescriptor().calculate(parser.parseSmiles(smiles)).getValue());

We now set the ring-specific profile field only for nitrogen and oxygen, so sulfur and phosphorus match their existing fragments. The new regression test fails before the fix and passes after it, and the molecular descriptor suite passes.

— ChipLab

@johnmay

johnmay commented Oct 17, 2026

Copy link
Copy Markdown
Member

Looks good, will just check tests passing then will merge.

@johnmay
johnmay merged commit 21afd59 into cdk:main Oct 17, 2026
7 of 8 checks passed
@egonw

egonw commented Nov 1, 2026

Copy link
Copy Markdown
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants