spacegroup=225, cellpar=[a, a, a, 90, 90, 90])) # Create the calculator running on one, eight-core node. # This is specific to the setup on my cluster. # You have to adapt this part to your environment calc = ClusterVasp(nodes=1, ppn=8) # Assign the calculator to the crystal cryst.set_calculator(calc) # Set the calculation parameters calc.set(prec='Accurate', xc='PBE', lreal=False, nsw=30, ediff=1e-8, ibrion=2, kpts=[3, 3, 3]) # Set the calculation mode first. # Full structure optimization in this case. # Not all calculators have this type of internal minimizer! calc.set(isif=3) print("Running initial optimization ... ", end=' ') print("Residual pressure: %.3f bar" % (cryst.get_isotropic_pressure(cryst.get_stress()))) # Clean up the directory calc.clean()
spacegroup=225, cellpar=[a, a, a, 90, 90, 90])) # Create the calculator running on one, eight-core node. # This is specific to the setup on my cluster. # You have to adapt this part to your environment calc=ClusterVasp(nodes=1,ppn=8) # Assign the calculator to the crystal cryst.set_calculator(calc) # Set the calculation parameters calc.set(prec = 'Accurate', xc = 'PBE', lreal = False, nsw=30, ediff=1e-8, ibrion=2, kpts=[3,3,3]) # Set the calculation mode first. # Full structure optimization in this case. # Not all calculators have this type of internal minimizer! calc.set(isif=3) print "Running initial optimization ... ", print "Residual pressure: %.3f bar" % ( cryst.get_isotropic_pressure(cryst.get_stress())) # Clean up the directory calc.clean()
banner('Structure optimization on MgO') a = 4.291 MgO = crystal(['Mg', 'O'], [(0, 0, 0), (0.5, 0.5, 0.5)], spacegroup=225, cellpar=[a, a, a, 90, 90, 90]) ################################## # Provide your own calculator here ################################## calc=ClusterVasp(nodes=1,ppn=8) # The calculator must be runnable in an isolated directory # Without disturbing other running instances of the same calculator # They are run in separate processes (not threads!) MgO.set_calculator(calc) calc.set(prec = 'Accurate', xc = 'PBE', lreal = False, isif=2, nsw=20, ibrion=2, kpts=[1,1,1]) print("Residual pressure: %.3f GPa" % (MgO.get_pressure()/GPa)) calc.clean() banner('Volume scan on MgO (+/- 5%)') systems=[] for av in numpy.linspace(a*0.95,a*1.05,5): systems.append(crystal(['Mg', 'O'], [(0, 0, 0), (0.5, 0.5, 0.5)], spacegroup=225, cellpar=[av, av, av, 90, 90, 90])) pcalc=ClusterVasp(nodes=1,ppn=8) pcalc.set(prec = 'Accurate', xc = 'PBE', lreal = False, isif=2, nsw=20, ibrion=2, kpts=[1,1,1]) res=ParCalculate(systems,pcalc)
spacegroup=225, cellpar=[a, a, a, 90, 90, 90]) ################################## # Provide your own calculator here ################################## calc = ClusterVasp(nodes=1, ppn=8) # The calculator must be runnable in an isolated directory # Without disturbing other running instances of the same calculator # They are run in separate processes (not threads!) MgO.set_calculator(calc) calc.set(prec='Accurate', xc='PBE', lreal=False, isif=2, nsw=20, ibrion=2, kpts=[1, 1, 1]) print("Residual pressure: %.3f GPa" % (MgO.get_pressure() / GPa)) calc.clean() banner('Volume scan on MgO (+/- 5%)') systems = [] for av in numpy.linspace(a * 0.95, a * 1.05, 5): systems.append( crystal(['Mg', 'O'], [(0, 0, 0), (0.5, 0.5, 0.5)], spacegroup=225, cellpar=[av, av, av, 90, 90, 90]))