def __init__( self, hirshfeld=None, vdwradii=None, calculator=None, Rmax=10, # maximal radius for periodic calculations vdWDB_alphaC6=vdWDB_alphaC6, txt=None): """Constructor Parameters ========== hirshfeld: the Hirshfeld partitioning object calculator: the calculator to get the PBE energy """ self.hirshfeld = hirshfeld if calculator is None: self.calculator = self.hirshfeld.get_calculator() else: self.calculator = calculator if txt is None: self.txt = self.calculator.txt else: self.txt = get_txt(txt, rank) self.vdwradii = vdwradii self.vdWDB_alphaC6 = vdWDB_alphaC6 self.Rmax = Rmax self.atoms = None self.sR = 0.94 self.d = 20 Calculator.__init__(self)
def __init__(self, hirshfeld=None, vdwradii=None, calculator=None, Rmax = 10, # maximal radius for periodic calculations vdWDB_alphaC6 = vdWDB_alphaC6, txt=None, ): """Constructor Parameters ========== hirshfeld: the Hirshfeld partitioning object calculator: the calculator to get the PBE energy """ self.hirshfeld = hirshfeld if calculator is None: self.calculator = self.hirshfeld.get_calculator() else: self.calculator = calculator if txt is None: self.txt = self.calculator.txt else: self.txt = get_txt(txt, rank) self.vdwradii = vdwradii self.vdWDB_alphaC6 = vdWDB_alphaC6 self.Rmax = Rmax self.atoms = None self.sR = 0.94 self.d = 20 Calculator.__init__(self)
def set_txt(self, txt): """Set the stream for text output. If `txt` is not a stream-object, then it must be one of: * None: Throw output away. * '-': Use stdout (``sys.stdout``) on master, elsewhere throw away. * A filename: Open a new file on master, elsewhere throw away. """ self.txt = get_txt(txt, self.wfs.world.rank) self.print_header()