Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small fixes #123

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
~AsymmetricUnitCartesian.fragmentate
~AsymmetricUnitCartesian.from_ase_atoms
~AsymmetricUnitCartesian.from_pymatgen_molecule
~AsymmetricUnitCartesian.from_pyscf
~AsymmetricUnitCartesian.get_align_transf
~AsymmetricUnitCartesian.get_angle_degrees
~AsymmetricUnitCartesian.get_ase_atoms
Expand Down Expand Up @@ -70,6 +71,7 @@
~AsymmetricUnitCartesian.symmetrize
~AsymmetricUnitCartesian.to_cjson
~AsymmetricUnitCartesian.to_latex
~AsymmetricUnitCartesian.to_pyscf
~AsymmetricUnitCartesian.to_string
~AsymmetricUnitCartesian.to_xyz
~AsymmetricUnitCartesian.to_zmat
Expand Down
2 changes: 2 additions & 0 deletions docs/source/src_Cartesian/chemcoord.Cartesian.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
~Cartesian.fragmentate
~Cartesian.from_ase_atoms
~Cartesian.from_pymatgen_molecule
~Cartesian.from_pyscf
~Cartesian.get_align_transf
~Cartesian.get_angle_degrees
~Cartesian.get_ase_atoms
Expand Down Expand Up @@ -69,6 +70,7 @@
~Cartesian.symmetrize
~Cartesian.to_cjson
~Cartesian.to_latex
~Cartesian.to_pyscf
~Cartesian.to_string
~Cartesian.to_xyz
~Cartesian.to_zmat
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
:orphan:

chemcoord.Cartesian.from\_pyscf
====================================

.. currentmodule:: chemcoord

.. automethod:: Cartesian.from_pyscf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
:orphan:

chemcoord.Cartesian.to\_pyscf
===========================

.. currentmodule:: chemcoord

.. automethod:: Cartesian.to_pyscf
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@
if r == 0:
return np.array([0.0, 0.0, 0.0])
alpha = arccos(-z / r)
delta = arctan2(-y / r, x / r)
delta = arctan2(-y, x)

Check warning on line 1098 in src/chemcoord/_cartesian_coordinates/_cart_transformation.py

View check run for this annotation

Codecov / codecov/patch

src/chemcoord/_cartesian_coordinates/_cart_transformation.py#L1098

Added line #L1098 was not covered by tests
return np.array([r, alpha, delta])


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@
return molecule

@classmethod
def from_pyscf_molecule(cls, mol):
def from_pyscf(cls, mol):

Check warning on line 271 in src/chemcoord/_cartesian_coordinates/_cartesian_class_io.py

View check run for this annotation

Codecov / codecov/patch

src/chemcoord/_cartesian_coordinates/_cartesian_class_io.py#L271

Added line #L271 was not covered by tests
"""Create an instance of the own class from a PySCF molecule

Args:
Expand Down
2 changes: 1 addition & 1 deletion tests/cartesian_coordinates/Cartesian/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ def test_xyz_cast():

def test_pyscf_conversion():
m = Cartesian.read_xyz(get_complete_path("water.xyz"))
assert allclose(Cartesian.from_pyscf_molecule(m.to_pyscf()), m)
assert allclose(Cartesian.from_pyscf(m.to_pyscf()), m)