Dear Dr. Kstokbro,
Thanks for your answers.
Usually I need to conduct DFT calculations for large systems composed of solids or oxides thin films. Did you mean ATK-DFT should be the fastest code when treating this kind of calculation? But the calculation for me isn't as fast as you said. I think some important parameters may not be very reasonable in my recent calculations.
To make it clear, the codes of a recent DFT calculation was pasted here. Could you give me some advice especially for the convergence criterion. This work of geometry optimization cost me 17 hours using one master and 3 slaves, which was much slower than other packages did.
Kindest bests
Fang
| # ------------------------------------------------------------- |
| # Bulk configuration |
| # ------------------------------------------------------------- |
| |
| # Set up lattice |
| lattice = SimpleTetragonal(3.9909999371*Angstrom, 36.2396011353*Angstrom) |
| |
| # Define elements |
| elements = [Platinum, Platinum, Platinum, Platinum, Platinum, Platinum, |
| Platinum, Platinum, Platinum, Platinum, Platinum, Platinum, |
| Platinum, Platinum, Platinum, Platinum, Platinum, Platinum, Barium, |
| Barium, Barium, Barium, Titanium, Titanium, Titanium, Titanium, |
| Titanium, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, |
| Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen] |
| |
| # Define coordinates |
| fractional_coordinates = [[ 0. , 0. , 0.054310001], |
| [ 0. , 0. , 0.162929997], |
| [ 0. , 0.5 , 0. ], |
| [ 0. , 0.5 , 0.108620003], |
| [ 0. , 0.5 , 0.217230007], |
| [ 0.5 , 0. , 0. ], |
| [ 0.5 , 0. , 0.108620003], |
| [ 0.5 , 0. , 0.217230007], |
| [ 0.5 , 0.5 , 0.054310001], |
| [ 0.5 , 0.5 , 0.162929997], |
| [ 0. , 0. , 0.945689976], |
| [ 0. , 0. , 0.837069988], |
| [ 0. , 0.5 , 0.891380012], |
| [ 0. , 0.5 , 0.782769978], |
| [ 0.5 , 0. , 0.891380012], |
| [ 0.5 , 0. , 0.782769978], |
| [ 0.5 , 0.5 , 0.945689976], |
| [ 0.5 , 0.5 , 0.837069988], |
| [ 0. , 0. , 0.331499994], |
| [ 0. , 0. , 0.443830013], |
| [ 0. , 0. , 0.556169987], |
| [ 0. , 0. , 0.668500006], |
| [ 0.5 , 0.5 , 0.276719987], |
| [ 0.5 , 0.5 , 0.389050007], |
| [ 0.5 , 0.5 , 0.501380026], |
| [ 0.5 , 0.5 , 0.613709986], |
| [ 0.5 , 0.5 , 0.726040006], |
| [ 0.5 , 0. , 0.275339991], |
| [ 0.5 , 0. , 0.38767001 ], |
| [ 0.5 , 0. , 0.5 ], |
| [ 0.5 , 0. , 0.612330019], |
| [ 0.5 , 0. , 0.724659979], |
| [ 0. , 0.5 , 0.275339991], |
| [ 0. , 0.5 , 0.38767001 ], |
| [ 0. , 0.5 , 0.5 ], |
| [ 0. , 0.5 , 0.612330019], |
| [ 0. , 0.5 , 0.724659979], |
| [ 0.5 , 0.5 , 0.331499994], |
| [ 0.5 , 0.5 , 0.443830013], |
| [ 0.5 , 0.5 , 0.556169987], |
| [ 0.5 , 0.5 , 0.668500006]] |
| |
| # Set up configuration |
| bulk_configuration = BulkConfiguration( |
| bravais_lattice=lattice, |
| elements=elements, |
| fractional_coordinates=fractional_coordinates |
| ) |
| |
| # Add tags |
| bulk_configuration.addTags('Constraints') |
| |
| # ------------------------------------------------------------- |
| # Calculator |
| # ------------------------------------------------------------- |
| #---------------------------------------- |
| # Basis Set |
| #---------------------------------------- |
| basis_set = [ |
| GGABasis.Oxygen_DoubleZetaPolarized, |
| GGABasis.Titanium_DoubleZetaPolarized, |
| GGABasis.Barium_DoubleZetaPolarized, |
| GGABasis.Platinum_DoubleZetaPolarized, |
| ] |
| |
| #---------------------------------------- |
| # Exchange-Correlation |
| #---------------------------------------- |
| exchange_correlation = GGA.PBE |
| |
| numerical_accuracy_parameters = NumericalAccuracyParameters( |
| k_point_sampling=(4, 4, 1), |
| ) |
| |
| calculator = LCAOCalculator( |
| basis_set=basis_set, |
| exchange_correlation=exchange_correlation, |
| numerical_accuracy_parameters=numerical_accuracy_parameters, |
| ) |
| |
| bulk_configuration.setCalculator(calculator) |
| nlprint(bulk_configuration) |
| bulk_configuration.update() |
| nlsave('fer_relax.nc', bulk_configuration) |
| |
| constraints = [FixStrain(x=True, y=True, z=False), 2, 5] |
| bulk_configuration = OptimizeGeometry( |
| bulk_configuration, |
| max_forces=0.1*eV/Ang, |
| max_stress=0.05*eV/Ang**3, |
| max_steps=200, |
| max_step_length=0.2*Ang, |
| constraints=constraints, |
| trajectory_filename=None, |
| optimizer_method=LBFGS(), |
| ) |
| nlsave('fer_relax.nc', bulk_configuration) |
| nlprint(bulk_configuration) |