Skip to content

Commit

Permalink
Merge b64cce4 into bfd8712
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Aug 7, 2020
2 parents bfd8712 + b64cce4 commit cfda190
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 59 deletions.
58 changes: 0 additions & 58 deletions pyiron/atomistics/job/atomistic.py
Expand Up @@ -612,52 +612,6 @@ def get_final_structure(self):
)
return self.get_structure(iteration_step=-1)

def set_kpoints(
self,
mesh=None,
scheme="MP",
center_shift=None,
symmetry_reduction=True,
manual_kpoints=None,
weights=None,
reciprocal=True,
):
"""
Args:
mesh:
scheme:
center_shift:
symmetry_reduction:
manual_kpoints:
weights:
reciprocal:
Returns:
"""
raise NotImplementedError(
"The set_kpoints function is not implemented for this code."
)

def set_encut(self, encut):
"""
Args:
encut:
Returns:
"""
raise NotImplementedError(
"The set_encut function is not implemented for this code."
)

def get_encut(self):
raise NotImplementedError(
"The set_encut function is not implemented for this code."
)

def get_structure(self, iteration_step=-1, wrap_atoms=True):
"""
Gets the structure from a given iteration step of the simulation (MD/ionic relaxation). For static calculations
Expand Down Expand Up @@ -741,16 +695,6 @@ def _before_successor_calc(self, ham):
ham.to_hdf()


def set_encut(job, parameter):
job.set_encut(parameter)
return job


def set_kpoints(job, parameter):
job.set_kpoints(parameter)
return job


def set_structure(job, parameter):
job.structure = parameter
return job
Expand All @@ -759,8 +703,6 @@ def set_structure(job, parameter):
class MapFunctions(object):
def __init__(self):
self.set_structure = set_structure
self.set_encut = set_encut
self.set_kpoints = set_kpoints


class Trajectory(object):
Expand Down
20 changes: 19 additions & 1 deletion pyiron/dft/job/generic.py
Expand Up @@ -3,7 +3,7 @@
# Distributed under the terms of "New BSD License", see the LICENSE file.

import numpy as np
from pyiron.atomistics.job.atomistic import AtomisticGenericJob
from pyiron.atomistics.job.atomistic import AtomisticGenericJob, MapFunctions as AtomisticMapFunctions
import warnings

__author__ = "Jan Janssen"
Expand All @@ -22,6 +22,7 @@ class GenericDFTJob(AtomisticGenericJob):
def __init__(self, project, job_name):
super(GenericDFTJob, self).__init__(project, job_name)
self._generic_input["fix_symmetry"] = True
self.map_functions = MapFunctions()

@property
def encut(self):
Expand Down Expand Up @@ -306,3 +307,20 @@ def set_empty_states(self, n_empty_states=None):
raise NotImplementedError(
"The set_empty_states function is not implemented for this code."
)


def set_encut(job, parameter):
job.set_encut(parameter)
return job


def set_kpoints(job, parameter):
job.set_kpoints(parameter)
return job


class MapFunctions(AtomisticMapFunctions):
def __init__(self):
super().__init__()
self.set_encut = set_encut
self.set_kpoints = set_kpoints

0 comments on commit cfda190

Please sign in to comment.