def get_unrelaxed_structure(): atoms = Cluster(ase.build.mx2('MoS2')) atoms.center(vacuum=vacuum_sep, axis=2) return atoms
txt=fname + '.log', occupations=FermiDirac(0.0, fixmagmom=True), convergence={ 'energy': 0.005, 'bands': nbands, 'eigenstates': 1e-4, 'density': 1e-3 }) atoms.set_calculator(calc) try: atoms.get_potential_energy() except KohnShamConvergenceError: pass if calc.scf.converged: for calcp in calc_parms: calc.set(**calcp) try: calc.calculate(system_changes=[]) except KohnShamConvergenceError: break if calc.scf.converged: calc.write(fname + '.gpw', mode='all') loa = Cluster(molecule('NaCl')) loa.minimal_box(border=6.0, h=0.25, multiple=16) loa.center() loa.translate([0.001, 0.002, 0.003]) nbands = 25 calc_me(loa, nbands)