Skip to content

Commit

Permalink
Merge pull request #23 from wsprague-nu/dev
Browse files Browse the repository at this point in the history
Update to version 0.5.6a1
  • Loading branch information
wsprague-nu authored Nov 11, 2024
2 parents 34422f5 + 44c65f2 commit e68ea6e
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 5 deletions.
39 changes: 39 additions & 0 deletions doranet/modules/synthetic/Reaction_Smarts_Forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,25 @@ class OperatorSmarts:
(1, 1),
(1,),
),
# Enolate Alkylation
# From James Gerken: it doesn't really form HX as a product but rather MX
# and the protonated form of whatever base was used to deprotonate alpha to the carbonyl.
# Estimated difference in DMSO pKa between RC(=O)C-H and H-Br, should be about -33 kcal/mol
OperatorSmarts(
"Enolate Alkylation",
"[C+0:2](=[O+0:3])[C+0!H0:4].[CX4;+0:5][F,Cl,Br,I;+0:6]>>[*:2](=[*:3])[*:4][*:5].[*:6]",
(1, 1),
(1, 1),
enthalpy_correction=-33,
),
OperatorSmarts(
"Enolate Alkylation, Intramolecular",
"([C+0:2](=[O+0:3])[C+0!H0:4].[CX4;+0:5][F,Cl,Br,I;+0:6])>>[*:2](=[*:3])[*:4][*:5].[*:6]",
(1,),
(1, 1),
enthalpy_correction=-33,
ring_issue=True,
),
# Alcohols #############################################################
# Glycol Cleavage by Oxidation
OperatorSmarts(
Expand Down Expand Up @@ -1133,6 +1152,26 @@ class OperatorSmarts:
(1, 1),
(1, 1),
),
OperatorSmarts(
"Synthesis of Enol Ethers from Aldehyde and Alcohol, Intramolecular",
"([CX4+0;H2,H3:1][O+0H:2].[CX4+0!H0:3][CX3+0H:4]=[O+0:5])>>[*:1][*:2][*:4]=[*:3].[*:5]",
(1,),
(1, 1),
),
# Pinacol Coupling
OperatorSmarts(
"Pinacol Coupling",
"[C+0X3;!$(*-O):2](=[O+0:3]).[C+0X3;!$(*-O):6](=[O+0:7]).[H][H]>>[*:2](-[*:3])-[*:6]-[*:7]",
(1, 1, 1),
(1,),
),
OperatorSmarts(
"Pinacol Coupling, Intramolecular",
"([C+0X3;!$(*-O):2](=[O+0:3]).[C+0X3;!$(*-O):6](=[O+0:7])).[H][H]>>[*:2](-[*:3])-[*:6]-[*:7]",
(1, 1),
(1,),
ring_issue=True,
),
# Carboxylic Acids ####################################################
# Carboxylic Acids Decarboxylation
OperatorSmarts(
Expand Down
37 changes: 37 additions & 0 deletions doranet/modules/synthetic/Reaction_Smarts_Retro.py
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,24 @@ class OperatorSmarts:
(1,),
(1, 1),
),
# Enolate Alkylation
# From James Gerken: it doesn't really form HX as a product but rather MX
# and the protonated form of whatever base was used to deprotonate alpha to the carbonyl.
# Estimated difference in DMSO pKa between RC(=O)C-H and H-Br, should be about -33 kcal/mol
OperatorSmarts(
"Enolate Alkylation",
"[C+0:2](=[O+0:3])[C+0:4]!@[CX4;+0:5].[F,Cl,Br,I;+0H:6]>>[*:2](=[*:3])[*:4].[*:5][*:6]",
(1, 1),
(1, 1),
enthalpy_correction=-33,
),
OperatorSmarts(
"Enolate Alkylation, Intramolecular",
"[C+0:2](=[O+0:3])[C+0:4]@[CX4;+0:5].[F,Cl,Br,I;+0H:6]>>([*:2](=[*:3])[*:4].[*:5][*:6])",
(1, 1),
(1,),
enthalpy_correction=-33,
),
# Alcohols #############################################################
# Glycol Cleavage by Oxidation
OperatorSmarts(
Expand Down Expand Up @@ -1180,6 +1198,25 @@ class OperatorSmarts:
(1, 1),
(1, 1),
),
OperatorSmarts(
"Synthesis of Enol Ethers from Aldehyde and Alcohol, Intramolecular",
"[CX4+0;H2,H3:1][O+0:2]-@[C+0H:4]=[CX3+0:3].[O+0H2:5]>>([*:1][*:2].[*:3][*:4]=[*:5])",
(1, 1),
(1,),
),
# Pinacol Coupling
OperatorSmarts(
"Pinacol Coupling",
"[C+0X4;!$(*(-O)-O):2](-[O+0H:3])-!@[C+0X4;!$(*(-O)-O):6]-[O+0H:7]>>[*:2](=[*:3]).[*:6](=[*:7]).[H][H]",
(1,),
(1, 1, 1),
),
OperatorSmarts(
"Pinacol Coupling, Intramolecular",
"[C+0X4;!$(*(-O)-O):2](-[O+0H:3])-@[C+0X4;!$(*(-O)-O):6]-[O+0H:7]>>([*:2](=[*:3]).[*:6](=[*:7])).[H][H]",
(1,),
(1, 1),
),
# Carboxylic Acids ####################################################
# Carboxylic Acids Decarboxylation
OperatorSmarts(
Expand Down
9 changes: 5 additions & 4 deletions doranet/modules/synthetic/generate_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,13 @@ def __call__(
if rea_Hf is None:
return float("nan")
dH = dH - rea_Hf * data.operator.meta["reactants_stoi"][idx]
if data.operator.meta["enthalpy_correction"] is not None:
dH = dH + data.operator.meta["enthalpy_correction"]
correction = data.operator.meta["enthalpy_correction"]
if correction is None:
correction = 0
if self.direction == "forward":
dH = dH / data.operator.meta["number_of_steps"]
dH = (dH + correction) / data.operator.meta["number_of_steps"]
if self.direction == "retro":
dH = -dH / data.operator.meta["number_of_steps"]
dH = (-dH + correction) / data.operator.meta["number_of_steps"]
return round(dH, 4)

@property
Expand Down
Empty file added doranet/py.typed
Empty file.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = 'doranet'
version = '0.5.5a1'
version = '0.5.6a1'
authors = [
{ name='William Sprague', email='[email protected]' },
{ name='Quan Zhang', email='[email protected]' },
Expand Down

0 comments on commit e68ea6e

Please sign in to comment.