Beispiel #1
0
 def __init__(self,
              atomic_correction=None,
              interpolation=3,
              force_complex_dtype=False):
     self.atomic_correction = atomic_correction
     self.interpolation = interpolation
     Mode.__init__(self, force_complex_dtype)
Beispiel #2
0
    def __init__(self, ecut=340, fftwflags=fftw.ESTIMATE, cell=None,
                 force_complex_dtype=False):
        """Plane-wave basis mode.

        ecut: float
            Plane-wave cutoff in eV.
        fftwflags: int
            Flags for making FFTW plan (default is ESTIMATE).
        cell: 3x3 ndarray
            Use this unit cell to chose the planewaves."""

        self.ecut = ecut / units.Hartree
        self.fftwflags = fftwflags

        if cell is None:
            self.cell_cv = None
        else:
            self.cell_cv = cell / units.Bohr

        Mode.__init__(self, force_complex_dtype)
Beispiel #3
0
 def todict(self):
     dct = Mode.todict(self)
     dct['nn'] = self.nn
     dct['interpolation'] = self.interpolation
     return dct
Beispiel #4
0
 def __init__(self, nn=3, interpolation=3, force_complex_dtype=False):
     self.nn = nn
     self.interpolation = interpolation
     Mode.__init__(self, force_complex_dtype)
Beispiel #5
0
 def todict(self):
     dct = Mode.todict(self)
     dct['ecut'] = self.ecut * units.Hartree
     if self.cell_cv is not None:
         dct['cell'] = self.cell_cv * units.Bohr
     return dct