rowan-python 1.1.1__py3-none-any.whl → 1.1.2__py3-none-any.whl

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.
@@ -1,3 +1,5 @@
1
- from .chem_utils import pka, tautomers, conformers, energy, optimize, batch_pka, batch_tautomers, batch_energy, batch_optimize, batch_conformers
1
+ from .chem_utils import (run_pka, run_tautomers, run_conformers, run_energy,
2
+ run_optimize, run_batch_pka, run_batch_tautomers, run_batch_energy, run_batch_optimize, run_batch_conformers)
2
3
 
3
- __all__ = ["pka", "tautomers", "energy", "conformers", "optimize", "batch_pka", "batch_tautomers", "batch_energy", "batch_optimize", "batch_conformers"]
4
+ __all__ = ["run_pka", "run_tautomers", "run_energy", "run_conformers", "run_optimize",
5
+ "run_batch_pka", "run_batch_tautomers", "run_batch_energy", "run_batch_optimize", "run_batch_conformers"]
@@ -36,7 +36,7 @@ def _get_rdkit_mol_from_uuid(calculation_uuid: str) -> RdkitMol:
36
36
  rdkm = Chem.MolFromXYZBlock(stjames_mol.to_xyz())
37
37
  return rdkm
38
38
 
39
- def embed_rdkit_mol(rdkm: RdkitMol):
39
+ def _embed_rdkit_mol(rdkm: RdkitMol):
40
40
  try:
41
41
  AllChem.SanitizeMol(rdkm)
42
42
  except Exception as e:
@@ -58,9 +58,9 @@ def embed_rdkit_mol(rdkm: RdkitMol):
58
58
 
59
59
  return rdkm
60
60
 
61
- def rdkit_to_cctk(rdkm: RdkitMol, cid: int = 0) -> cctk.Molecule:
61
+ def _rdkit_to_cctk(rdkm: RdkitMol, cid: int = 0) -> cctk.Molecule:
62
62
  if len(rdkm.GetConformers()) == 0:
63
- rdkm = embed_rdkit_mol(rdkm)
63
+ rdkm = _embed_rdkit_mol(rdkm)
64
64
  try:
65
65
  nums = [atom.GetAtomicNum() for atom in rdkm.GetAtoms()]
66
66
  geom = rdkm.GetConformers()[cid].GetPositions()
@@ -68,7 +68,7 @@ def rdkit_to_cctk(rdkm: RdkitMol, cid: int = 0) -> cctk.Molecule:
68
68
  except IndexError as e:
69
69
  raise ConversionError("RDKit molecule does not have a conformer with the given ID") from e
70
70
 
71
- def cctk_to_stjames(cmol: cctk.Molecule) -> stjames.Molecule:
71
+ def _cctk_to_stjames(cmol: cctk.Molecule) -> stjames.Molecule:
72
72
  atomic_numbers = cmol.atomic_numbers.view(np.ndarray)
73
73
  geometry = cmol.geometry.view(np.ndarray)
74
74
  atoms = []
@@ -77,11 +77,11 @@ def cctk_to_stjames(cmol: cctk.Molecule) -> stjames.Molecule:
77
77
 
78
78
  return stjames.Molecule(atoms=atoms, charge=cmol.charge, multiplicity=cmol.multiplicity)
79
79
 
80
- def rdkit_to_stjames(rdkm: RdkitMol, cid: int = 0) -> stjames.Molecule:
81
- cmol = rdkit_to_cctk(rdkm, cid)
82
- return cctk_to_stjames(cmol)
80
+ def _rdkit_to_stjames(rdkm: RdkitMol, cid: int = 0) -> stjames.Molecule:
81
+ cmol = _rdkit_to_cctk(rdkm, cid)
82
+ return _cctk_to_stjames(cmol)
83
83
 
84
- def pka(mol: RdkitMol,
84
+ def run_pka(mol: RdkitMol,
85
85
  mode: pKaMode = "rapid",
86
86
  timeout: int = 600,
87
87
  name: str = "pKa API Workflow",
@@ -91,7 +91,7 @@ def pka(mol: RdkitMol,
91
91
  folder_uuid: Optional[stjames.UUID] = None)-> tuple[dict[int, float], dict[int, float]]:
92
92
  return asyncio.run(_single_pka(mol, mode, timeout, name, pka_range, deprotonate_elements, protonate_elements, folder_uuid))
93
93
 
94
- def batch_pka(mols: List[RdkitMol],
94
+ def run_batch_pka(mols: List[RdkitMol],
95
95
  mode: pKaMode = "rapid",
96
96
  timeout: int = 600,
97
97
  name: str = "pKa API Workflow",
@@ -126,7 +126,7 @@ async def _single_pka(mol: RdkitMol,
126
126
  post = rowan.Workflow.submit(
127
127
  name=name,
128
128
  workflow_type="pka",
129
- initial_molecule=rdkit_to_stjames(mol),
129
+ initial_molecule=_rdkit_to_stjames(mol),
130
130
  workflow_data={
131
131
  "pka_range": pka_range,
132
132
  "deprotonate_elements": deprotonate_elements,
@@ -168,7 +168,7 @@ async def _single_pka(mol: RdkitMol,
168
168
  return {"acidic_pkas": acidic_pkas, "basic_pkas": basic_pkas}
169
169
 
170
170
 
171
- def tautomers(mol: RdkitMol,
171
+ def run_tautomers(mol: RdkitMol,
172
172
  mode: TautomerMode = "reckless",
173
173
  timeout: int = 600,
174
174
  name: str = "Tautomers API Workflow",
@@ -180,7 +180,7 @@ def tautomers(mol: RdkitMol,
180
180
  """
181
181
  return asyncio.run(_single_tautomers(mol, mode, timeout, name, folder_uuid))
182
182
 
183
- def batch_tautomers(mols: List[RdkitMol],
183
+ def run_batch_tautomers(mols: List[RdkitMol],
184
184
  mode: TautomerMode = "reckless",
185
185
  timeout: int = 600,
186
186
  name: str = "Tautomers API Workflow",
@@ -211,7 +211,7 @@ async def _single_tautomers(mol: RdkitMol,
211
211
  post = rowan.Workflow.submit(
212
212
  name=name,
213
213
  workflow_type="tautomers",
214
- initial_molecule=rdkit_to_stjames(mol),
214
+ initial_molecule=_rdkit_to_stjames(mol),
215
215
  workflow_data={
216
216
  "mode": mode,
217
217
  },
@@ -238,7 +238,7 @@ async def _single_tautomers(mol: RdkitMol,
238
238
  #return relative weights too
239
239
  return tautomers
240
240
 
241
- def energy(
241
+ def run_energy(
242
242
  mol: RdkitMol,
243
243
  method: str = "aimnet2_wb97md3",
244
244
  engine: str = "aimnet2",
@@ -257,7 +257,7 @@ def energy(
257
257
  """
258
258
  return asyncio.run(_single_energy(mol, method, engine, mode, timeout, name, folder_uuid))
259
259
 
260
- def batch_energy(
260
+ def run_batch_energy(
261
261
  mols: List[RdkitMol],
262
262
  method: str = "aimnet2_wb97md3",
263
263
  engine: str = "aimnet2",
@@ -302,7 +302,7 @@ async def _single_energy(
302
302
  method = stjames.Method(method)
303
303
 
304
304
  if mol.GetNumConformers() == 0:
305
- mol = embed_rdkit_mol(mol)
305
+ mol = _embed_rdkit_mol(mol)
306
306
  if mol.GetNumConformers() == 0:
307
307
  raise NoConformersError("This molecule has no conformers")
308
308
 
@@ -314,7 +314,7 @@ async def _single_energy(
314
314
  workflow_uuids = []
315
315
  for conformer in mol.GetConformers():
316
316
  cid = conformer.GetId()
317
- stjames_mol = rdkit_to_stjames(mol, cid)
317
+ stjames_mol = _rdkit_to_stjames(mol, cid)
318
318
  get_api_key()
319
319
  post = rowan.Workflow.submit(
320
320
  name=name,
@@ -351,7 +351,7 @@ async def _single_energy(
351
351
  return [{"conformer_index": index, "energy": energy} for index, energy in enumerate(energies)]
352
352
 
353
353
 
354
- def optimize(
354
+ def run_optimize(
355
355
  mol: RdkitMol,
356
356
  method: str = "aimnet2_wb97md3",
357
357
  engine: str = "aimnet2",
@@ -373,7 +373,7 @@ def optimize(
373
373
  """
374
374
  return asyncio.run(_single_optimize(mol, method, engine, mode, return_energies, timeout, name, folder_uuid))
375
375
 
376
- def batch_optimize(
376
+ def run_batch_optimize(
377
377
  mols: List[RdkitMol],
378
378
  method: str = "aimnet2_wb97md3",
379
379
  engine: str = "aimnet2",
@@ -424,7 +424,7 @@ async def _single_optimize(
424
424
  method = stjames.Method(method)
425
425
 
426
426
  if mol.GetNumConformers() == 0:
427
- mol = embed_rdkit_mol(mol)
427
+ mol = _embed_rdkit_mol(mol)
428
428
  if mol.GetNumConformers() == 0:
429
429
  raise NoConformersError("This molecule has no conformers")
430
430
 
@@ -438,7 +438,7 @@ async def _single_optimize(
438
438
  workflow_uuids = []
439
439
  for conformer in mol.GetConformers():
440
440
  cid = conformer.GetId()
441
- stjames_mol = rdkit_to_stjames(mol, cid)
441
+ stjames_mol = _rdkit_to_stjames(mol, cid)
442
442
  get_api_key()
443
443
  post = rowan.Workflow.submit(
444
444
  name=name,
@@ -486,7 +486,7 @@ async def _single_optimize(
486
486
 
487
487
  return return_dict
488
488
 
489
- def conformers(mol: RdkitMol, num_conformers=10,
489
+ def run_conformers(mol: RdkitMol, num_conformers=10,
490
490
  method: str = "aimnet2_wb97md3",
491
491
  mode: str = "rapid",
492
492
  return_energies: bool = False,
@@ -501,7 +501,7 @@ def conformers(mol: RdkitMol, num_conformers=10,
501
501
  """
502
502
  return asyncio.run(_single_conformers(mol, num_conformers, method, mode, return_energies, timeout, name, folder_uuid))
503
503
 
504
- def batch_conformers(mols: List[RdkitMol], num_conformers=10,
504
+ def run_batch_conformers(mols: List[RdkitMol], num_conformers=10,
505
505
  method: str = "aimnet2_wb97md3",
506
506
  mode: str = "rapid",
507
507
  return_energies: bool = False,
@@ -540,7 +540,7 @@ async def _single_conformers(mol: RdkitMol, num_conformers=10,
540
540
  method = stjames.Method(method)
541
541
 
542
542
  if mol.GetNumConformers() == 0:
543
- mol = embed_rdkit_mol(mol)
543
+ mol = _embed_rdkit_mol(mol)
544
544
  if mol.GetNumConformers() == 0:
545
545
  raise NoConformersError("This molecule has no conformers")
546
546
 
@@ -552,7 +552,7 @@ async def _single_conformers(mol: RdkitMol, num_conformers=10,
552
552
  post = rowan.Workflow.submit(
553
553
  name=name,
554
554
  workflow_type="conformer_search",
555
- initial_molecule=rdkit_to_stjames(mol),
555
+ initial_molecule=_rdkit_to_stjames(mol),
556
556
  workflow_data={
557
557
  "conf_gen_mode": "rapid",
558
558
  "mode": mode,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rowan-python
3
- Version: 1.1.1
3
+ Version: 1.1.2
4
4
  Summary: Rowan Python Library
5
5
  Project-URL: Homepage, https://github.com/rowansci/rowan-client
6
6
  Project-URL: Bug Tracker, https://github.com/rowansci/rowan-client/issues
@@ -5,9 +5,9 @@ rowan/constants.py,sha256=ZZvv3L0b2y3dMGlWGeaRmx40J5tBrpxNxvJgjP1TNjg,37
5
5
  rowan/folder.py,sha256=W7-YnPxugqzIdw-t1sr-WjeSQa-x4IjZ2mV2DwIq3II,2965
6
6
  rowan/utils.py,sha256=IMACnRJpjFns_DF-FZQDu8p8fbgu4C2dbDaxdGcSZQs,1405
7
7
  rowan/workflow.py,sha256=An3CW9LlHxYByE4mRl1iYThYcIGry8TwTi5rgbAsEBc,4467
8
- rowan/rowan_rdkit/__init__.py,sha256=31bFO_UzagQKXQlybrPc2wdFJ6lUGMmDzDqT-D6b0Fk,300
9
- rowan/rowan_rdkit/chem_utils.py,sha256=3MRMuwi6PIr_xkKmswfMlB7P7qdJgSQs-Q3YVhGh4LY,22438
10
- rowan_python-1.1.1.dist-info/METADATA,sha256=zwT_dYixj1two92Vg4f7zYZ18DiT4jbZRE-Hsvr_GwM,1030
11
- rowan_python-1.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
12
- rowan_python-1.1.1.dist-info/licenses/LICENSE,sha256=i7ehYBS-6gGmbTcgU4mgk28pyOx2kScJ0kcx8n7bWLM,1084
13
- rowan_python-1.1.1.dist-info/RECORD,,
8
+ rowan/rowan_rdkit/__init__.py,sha256=BfKNC7Ts_Gay-A6FzElwg8UM4fxSapCLzeKwr7_HZNs,395
9
+ rowan/rowan_rdkit/chem_utils.py,sha256=mVBE_OPGSPwEX_nhsJ43fIBAbdiQMTvYVHEQ9gCf0-M,22493
10
+ rowan_python-1.1.2.dist-info/METADATA,sha256=u7oIN6zws1JHthPcb8l818KoLcXFSYXsXxyeRbq7wO8,1030
11
+ rowan_python-1.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
12
+ rowan_python-1.1.2.dist-info/licenses/LICENSE,sha256=i7ehYBS-6gGmbTcgU4mgk28pyOx2kScJ0kcx8n7bWLM,1084
13
+ rowan_python-1.1.2.dist-info/RECORD,,