def __init__(self, atoms, **results): """Save energy, forces, stress, ... for the current configuration.""" Calculator.__init__(self) self.results = {} for property, value in results.items(): assert property in all_properties if value is None: continue # changed by Sizhe if property in [ 'energy', 'totforce', 'pressure', 'fermi', 'magmom', 'free_energy' ]: self.results[property] = value else: self.results[property] = np.array(value, float) self.atoms = atoms.copy()
def __init__(self, nixie, keypads): Calculator.__init__(self) self.nixie = nixie self.keypads = keypads self.mode = MODE_OFF self.clockLastTime = None