gnnepcsaft-mcp-server 0.1.3__tar.gz → 0.2.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of gnnepcsaft-mcp-server might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: gnnepcsaft-mcp-server
3
- Version: 0.1.3
3
+ Version: 0.2.3
4
4
  Summary: Model Context Protocol server for GNNePCSAFT tools
5
5
  License: GNU General Public License v3.0
6
6
  Author: wildsonbbl
@@ -4,6 +4,7 @@ from typing import Any, Callable, List
4
4
 
5
5
  from mcp.server.fastmcp import FastMCP
6
6
 
7
+ from .plot_utils import v3000_mol_block
7
8
  from .utils import (
8
9
  batch_convert_pure_density_to_kg_per_m3,
9
10
  batch_critical_points,
@@ -39,6 +40,7 @@ fn_list: List[Callable[..., Any]] = [
39
40
  mixture_vapor_pressure,
40
41
  pubchem_description,
41
42
  pure_phase,
43
+ v3000_mol_block,
42
44
  ]
43
45
  for fn in fn_list:
44
46
  mcp.add_tool(fn)
@@ -0,0 +1,28 @@
1
+ "plot utils"
2
+
3
+ from rdkit.Chem import AllChem as Chem
4
+
5
+ from .utils import smilestoinchi
6
+
7
+
8
+ def v3000_mol_block(smiles: str) -> str:
9
+ """Returns a V3000 Mol block for a molecule.
10
+
11
+ Args:
12
+ smiles (str): SMILES of the molecule.
13
+
14
+ """
15
+ inchi = smilestoinchi(smiles)
16
+
17
+ mol = Chem.MolFromInchi(inchi)
18
+ mol = Chem.AddHs(mol) # type: ignore
19
+ params = Chem.ETKDGv3() # type: ignore
20
+ params.randomSeed = 0xF00D
21
+ result = Chem.EmbedMolecule(mol, params) # type: ignore
22
+ if result == 0:
23
+ Chem.MMFFOptimizeMolecule( # type: ignore
24
+ mol, maxIters=1000, nonBondedThresh=100, ignoreInterfragInteractions=False
25
+ )
26
+ # mol = Chem.RemoveHs(mol, implicitOnly=False)
27
+ imgmol = Chem.MolToV3KMolBlock(mol) # type: ignore
28
+ return imgmol
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "gnnepcsaft-mcp-server"
3
- version = "0.1.3"
3
+ version = "0.2.3"
4
4
  description = "Model Context Protocol server for GNNePCSAFT tools"
5
5
  authors = [
6
6
  {name = "wildsonbbl",email = "wil_bbl@hotmail.com"}
@@ -22,7 +22,7 @@ dependencies = [
22
22
  gnnepcsaftmcp = 'gnnepcsaft_mcp_server.mcp_server:run'
23
23
 
24
24
  [tool.poetry]
25
- include = ["gnnepcsaft_mcp_server/models/assoc_8.onnx", "gnnepcsaft_mcp_server/models/assoc_8.onnx.data", "gnnepcsaft_mcp_server/models/msigmae_7.onnx", "gnnepcsaft_mcp_server/models/msigmae_7.onnx.data"]
25
+ include = ["gnnepcsaft_mcp_server/models/assoc_8.onnx", "gnnepcsaft_mcp_server/models/msigmae_7.onnx"]
26
26
 
27
27
 
28
28