def _print_escan_input(): from os.path import join as make_path from pylada.physics import a0 file = open(make_path(self.dir, self.vff_inputfile), "w") for i in xrange(3): for j in xrange(3): print >>file, structure.cell(i,j) * structure.scale / a0("A"), for j in xrange(3): print >>file, structure.cell(i,j) print >>file
def __call__(self, x): """ Returns value of function at x. """ import numpy as np from os.path import join as make_path assert self._size is not None run_vff = self._setx(x) if run_vff: vff.evaluate() vff.print_escan_input( make_path(self.dir, self.vff_inputfile) ) else: self._print_escan_input() return self.functional()