rowan-python 3.0.5__py3-none-any.whl → 3.0.6__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.
rowan/molecule.py CHANGED
@@ -52,28 +52,36 @@ class Molecule(BaseModel):
52
52
  return cls(_stjames=stjames.Molecule.from_smiles(smiles))
53
53
 
54
54
  @classmethod
55
- def from_xyz(cls, xyz_string: str, charge: int = 0, multiplicity: int = 1) -> Self:
55
+ def from_xyz(
56
+ cls, xyz_string: str, charge: int | None = None, multiplicity: int | None = None
57
+ ) -> Self:
56
58
  """
57
- Create molecule from XYZ string.
59
+ Create Molecule from XYZ string.
58
60
 
59
- :param xyz_string: XYZ format string.
60
- :param charge: Molecular charge (default 0).
61
- :param multiplicity: Spin multiplicity (default 1).
62
- :returns: Molecule instance.
61
+ :param xyz_string: XYZ format string
62
+ :param charge: charge
63
+ :param multiplicity: spin multiplicity
64
+ :returns: Molecule
63
65
  """
64
- stj = stjames.Molecule.from_xyz(xyz_string)
65
- stj = stjames.Molecule(atoms=stj.atoms, charge=charge, multiplicity=multiplicity)
66
- return cls(_stjames=stj)
66
+ return cls(
67
+ _stjames=stjames.Molecule.from_xyz(
68
+ xyz_string,
69
+ charge=charge,
70
+ multiplicity=multiplicity,
71
+ )
72
+ )
67
73
 
68
74
  @classmethod
69
- def from_xyz_file(cls, path: str | Path, charge: int = 0, multiplicity: int = 1) -> Self:
75
+ def from_xyz_file(
76
+ cls, path: str | Path, charge: int | None = None, multiplicity: int | None = None
77
+ ) -> Self:
70
78
  """
71
79
  Create molecule from XYZ file.
72
80
 
73
- :param path: Path to XYZ file.
74
- :param charge: Molecular charge (default 0).
75
- :param multiplicity: Spin multiplicity (default 1).
76
- :returns: Molecule instance.
81
+ :param path: path to XYZ file
82
+ :param charge: charge
83
+ :param multiplicity: spin multiplicity
84
+ :returns: Molecule
77
85
  """
78
86
  return cls.from_xyz(Path(path).read_text(), charge=charge, multiplicity=multiplicity)
79
87
 
@@ -82,8 +90,8 @@ class Molecule(BaseModel):
82
90
  """
83
91
  Create from stjames.Molecule.
84
92
 
85
- :param stj: stjames.Molecule instance.
86
- :returns: Molecule instance.
93
+ :param stj: stjames.Molecule
94
+ :returns: Molecule
87
95
  """
88
96
  return cls(_stjames=stj)
89
97
 
rowan/protein.py CHANGED
@@ -305,7 +305,7 @@ def list_proteins(
305
305
 
306
306
 
307
307
  def upload_protein(
308
- name: str, file_path: Path, project_uuid: str | Project | None = None
308
+ name: str, file_path: str | Path, project_uuid: str | Project | None = None
309
309
  ) -> Protein:
310
310
  """
311
311
  Uploads a protein from a PDB file to the API.
@@ -315,6 +315,7 @@ def upload_protein(
315
315
  :returns: Protein object representing the uploaded protein
316
316
  :raises requests.HTTPError: if the request to the API fails
317
317
  """
318
+ file_path = Path(file_path)
318
319
  if isinstance(project_uuid, Project):
319
320
  project_uuid = project_uuid.uuid
320
321
  with api_client() as client:
rowan/workflows/pka.py CHANGED
@@ -183,8 +183,7 @@ def submit_pka_workflow(
183
183
  )
184
184
  if method in _PKA_SMILES_METHODS and not initial_smiles:
185
185
  raise ValueError(
186
- f"{method} requires a SMILES string. "
187
- "Provide a SMILES string, not a 3D structure."
186
+ f"{method} requires a SMILES string. Provide a SMILES string, not a 3D structure."
188
187
  )
189
188
  if method in _PKA_WATER_ONLY_METHODS and solvent != "water":
190
189
  raise ValueError(f"{method} only supports water as solvent.")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rowan-python
3
- Version: 3.0.5
3
+ Version: 3.0.6
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
@@ -3,9 +3,9 @@ rowan/calculation.py,sha256=lZZ52DxPsuJWCTzFZXjhauHK6dV0KCUwzoxtmoxSY48,3442
3
3
  rowan/config.py,sha256=3cVKHUNzkIPnN2bvx7l5sia7Zc5poXS8lKOJlowXyLA,21088
4
4
  rowan/constants.py,sha256=emCH4m9OL2Hm5E-6mJGM_FgzrK_JrZT-FiKJ6pMNQ4Y,84
5
5
  rowan/folder.py,sha256=NkimVeHho9nwRXeS87U1tivEVL-1gL2Vqfz1fJ6XpNQ,9222
6
- rowan/molecule.py,sha256=MppZLHUAHzLCaIZtAbr2tpEULt5yRUR1B5npgFISCbE,10030
6
+ rowan/molecule.py,sha256=KQJhbNF2vmR8okBduXVqG7qG3LXbABLKHanpNhA-0TY,10003
7
7
  rowan/project.py,sha256=Wy3VvhwIMIumAZD2s7hPk8jj4bAPHMDNvsqU23RRqFo,4598
8
- rowan/protein.py,sha256=Ma2tBFF52Rb-ME5vZy5M5juMlmphQVQRL0Q1EBvBeZg,14761
8
+ rowan/protein.py,sha256=jyOM6g5eQH6KO8Eq07AiYBv2vZsGfbNOdtNOb2NWHFc,14799
9
9
  rowan/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  rowan/types.py,sha256=rCAnUlCsemyBK9Bbus0pL-THoqNqJIQHaMoDferIfFU,471
11
11
  rowan/user.py,sha256=Tnwz1-u_92ACt1xATQegtMj3FcosFsAG4m-4YuAkiyg,5955
@@ -35,7 +35,7 @@ rowan/workflows/membrane_permeability.py,sha256=oIDmB8qF_K_Kesv7o_FiljAk4dpptEeO
35
35
  rowan/workflows/msa.py,sha256=V3B1SyWPR8MT306hh9W-T9JTpi_E-XgAIeF9yRQZ7tI,5075
36
36
  rowan/workflows/multistage_optimization.py,sha256=HFVx8mnHxG97pDYyL6eOhNGmESqTxaKNgUdwrFpFUJ0,6456
37
37
  rowan/workflows/nmr.py,sha256=hergJdsiawKj7iV-jHxDOS03n_EnZcaCIt_ZTl34-JY,5183
38
- rowan/workflows/pka.py,sha256=YAnFq1zyJO3j9rfYCYyrl-C_o8uaFTpCqoldqiP7o1k,8349
38
+ rowan/workflows/pka.py,sha256=Gh-rMrqZyHbpIpX2LaEiBzlqE4paIE58paSkHEQCoEU,8334
39
39
  rowan/workflows/pose_analysis_md.py,sha256=UvotLhWv0_VAkKteZboOutDry7l-Zt1K6_SBx3EXqgM,9530
40
40
  rowan/workflows/protein_binder_design.py,sha256=J-9NSbRLdHb6JQRhY_vq43HlHCDCiQqrkOZUCAF-2dk,8604
41
41
  rowan/workflows/protein_cofolding.py,sha256=1R29XjAVjWHyelGG-mylP2GIamZbLCQKaaaFsCAnYgI,13012
@@ -49,7 +49,7 @@ rowan/workflows/solvent_dependent_conformers.py,sha256=ovvnhCE4xlkpdhccLHEq7oBJR
49
49
  rowan/workflows/spin_states.py,sha256=GZgBJPO6_ds9el4b7wbigIZ5213Z9DwXhokczJ5NDhs,7122
50
50
  rowan/workflows/strain.py,sha256=r0tlZoUlAslAiF7dPTpa9WlQFUAKyVjZ19zASjSS8Hs,6339
51
51
  rowan/workflows/tautomer_search.py,sha256=aqwXoj0ffWsb5gbvzfz_bpx5ifIfR_K07fbdWhU62Ko,5820
52
- rowan_python-3.0.5.dist-info/METADATA,sha256=0wZHFNgNRDm1DwrdDVJJh1Xu05Xm8A31whsYlwCSVWM,1600
53
- rowan_python-3.0.5.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
54
- rowan_python-3.0.5.dist-info/licenses/LICENSE,sha256=i05z7xEhyrg6f8j0lR3XYjShnF-MJGFQ-DnpsZ8yiVI,1084
55
- rowan_python-3.0.5.dist-info/RECORD,,
52
+ rowan_python-3.0.6.dist-info/METADATA,sha256=8c_sKx6JPCz0nVzsM_rX7N3bBjHz8_DxM58wZSFwLcs,1600
53
+ rowan_python-3.0.6.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
54
+ rowan_python-3.0.6.dist-info/licenses/LICENSE,sha256=i05z7xEhyrg6f8j0lR3XYjShnF-MJGFQ-DnpsZ8yiVI,1084
55
+ rowan_python-3.0.6.dist-info/RECORD,,