Skip to content

Commit

Permalink
Merge pull request #29 from pyiron/master
Browse files Browse the repository at this point in the history
Update from master
  • Loading branch information
jan-janssen committed Jan 19, 2021
2 parents 468553e + 33de9e5 commit 51015c7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .ci_support/environment.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
channels:
- conda-forge
dependencies:
- ase >=3.20.1
- ase >=3.21.0
- coveralls
- coverage
- codacy-coverage
Expand Down
14 changes: 1 addition & 13 deletions pyiron_atomistics/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,18 +192,6 @@ def create_object(object_type):
obj = ObjectType(object_type, project=None, job_name=None)
return obj

def copy(self):
"""
Copy the project object - copying just the Python object but maintaining the same pyiron path
Returns:
Project: copy of the project object
"""
new = Project(path=self.path, user=self.user, sql_query=self.sql_query)
new._filter = self._filter
new._inspect_mode = self._inspect_mode
return new

def load_from_jobpath(self, job_id=None, db_entry=None, convert_to_object=True):
"""
Internal function to load an existing job either based on the job ID or based on the database entry dictionary.
Expand All @@ -221,7 +209,7 @@ def load_from_jobpath(self, job_id=None, db_entry=None, convert_to_object=True):
job = super(Project, self).load_from_jobpath(
job_id=job_id, db_entry=db_entry, convert_to_object=convert_to_object
)
job.project_hdf5._project = Project(path=job.project_hdf5.file_path)
job.project_hdf5._project = self.__class__(path=job.project_hdf5.file_path)
return job

def load_from_jobpath_string(self, job_path, convert_to_object=True):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
keywords='pyiron',
packages=find_packages(exclude=["*tests*", "*docs*", "*binder*", "*conda*", "*notebooks*", "*.ci_support*"]),
install_requires=[
'ase>=3.20.1',
'ase>=3.21.0',
'defusedxml>=0.6.0',
'future>=0.18.2',
'h5py>=3.1.0',
Expand Down
8 changes: 4 additions & 4 deletions tests/atomistics/structure/test_atoms.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,19 +450,19 @@ def test_rotate_euler(self):
elements="AlFe", positions=[3 * [0], 3 * [1]], cell=2 * np.eye(3)
)
basis = unitcell.copy()
basis.rotate_euler(phi=0.1 * np.pi)
basis.euler_rotate(phi=0.1 * 180)
self.assertAlmostEqual(np.arccos(basis.positions[1, :2].sum() / 2) / np.pi, 0.1)
basis = unitcell.copy()
center_of_mass = basis.get_center_of_mass()
basis.rotate_euler(phi=0.1 * np.pi, center="com")
basis.euler_rotate(phi=0.1 * 180, center="com")
self.assertTrue(np.allclose(basis.get_center_of_mass(), center_of_mass))
basis = unitcell.copy()
center_of_positions = basis.positions.mean(axis=0)
basis.rotate_euler(phi=0.1 * np.pi, center="cop")
basis.euler_rotate(phi=0.1 * 180, center="cop")
self.assertTrue(np.allclose(center_of_positions, basis.positions.mean(axis=0)))
basis = unitcell.copy()
position = basis.positions[1]
basis.rotate_euler(phi=0.1 * np.pi, center="cou")
basis.euler_rotate(phi=0.1 * 180, center="cou")
self.assertTrue(np.allclose(position, basis.positions[1]))

def test_set_initial_magnetic_moments(self):
Expand Down

0 comments on commit 51015c7

Please sign in to comment.