Loading elastic_constants_script.py +6 −6 Original line number Diff line number Diff line Loading @@ -2,8 +2,8 @@ import numpy as np import matplotlib.pyplot as plt import json from scipy.optimize import curve_fit, root_scalar from ase.calculators.emt import EMT #from asap3 import EMT, EMTRasmussenParameters, EMT2013 #from ase.calculators.emt import EMT from asap3 import EMT, EMTRasmussenParameters, EMT2013 from ase.lattice.cubic import FaceCenteredCubic, BodyCenteredCubic, SimpleCubic from ase.io import Trajectory, read from ase.optimize import FIRE Loading Loading @@ -75,13 +75,13 @@ def write_to_csv(d_type, strains, energy_densities): if __name__ == '__main__': os.makedirs(os.path.dirname(directory), exist_ok=True) #relax initial structur lattice_const = float(input("Lattice constant for fcc: ")) lattice_const = 3.61 # float(input("Lattice constant for fcc: ")) #with open("data_min_energy/lattice_consts", "r") as file: #load lattice constant # lattice_const_dict = json.load(file) #lattice_const = lattice_const_dict['W_2nd_ord']['fcc'] strain_high = float(input("Enter value for highest strain (e.g. 0.02): ")) strain_low = float(input("Enter value for lowest (negative) strain (e.g. -0.02)")) N = int(input("How many data points should be evaluated (e.g. 50): ")) strain_high = 0.02 # float(input("Enter value for highest strain (e.g. 0.02): ")) strain_low = -0.02 #float(input("Enter value for lowest (negative) strain (e.g. -0.02)")) N =50 # int(input("How many data points should be evaluated (e.g. 50): ")) cell = FaceCenteredCubic('Cu', latticeconstant=lattice_const, size=(3,3,3)) cell.calc = EMT() # cell.calc = EMT(EMTRasmussenParameters()) in case other parameters need to be used Loading Loading
elastic_constants_script.py +6 −6 Original line number Diff line number Diff line Loading @@ -2,8 +2,8 @@ import numpy as np import matplotlib.pyplot as plt import json from scipy.optimize import curve_fit, root_scalar from ase.calculators.emt import EMT #from asap3 import EMT, EMTRasmussenParameters, EMT2013 #from ase.calculators.emt import EMT from asap3 import EMT, EMTRasmussenParameters, EMT2013 from ase.lattice.cubic import FaceCenteredCubic, BodyCenteredCubic, SimpleCubic from ase.io import Trajectory, read from ase.optimize import FIRE Loading Loading @@ -75,13 +75,13 @@ def write_to_csv(d_type, strains, energy_densities): if __name__ == '__main__': os.makedirs(os.path.dirname(directory), exist_ok=True) #relax initial structur lattice_const = float(input("Lattice constant for fcc: ")) lattice_const = 3.61 # float(input("Lattice constant for fcc: ")) #with open("data_min_energy/lattice_consts", "r") as file: #load lattice constant # lattice_const_dict = json.load(file) #lattice_const = lattice_const_dict['W_2nd_ord']['fcc'] strain_high = float(input("Enter value for highest strain (e.g. 0.02): ")) strain_low = float(input("Enter value for lowest (negative) strain (e.g. -0.02)")) N = int(input("How many data points should be evaluated (e.g. 50): ")) strain_high = 0.02 # float(input("Enter value for highest strain (e.g. 0.02): ")) strain_low = -0.02 #float(input("Enter value for lowest (negative) strain (e.g. -0.02)")) N =50 # int(input("How many data points should be evaluated (e.g. 50): ")) cell = FaceCenteredCubic('Cu', latticeconstant=lattice_const, size=(3,3,3)) cell.calc = EMT() # cell.calc = EMT(EMTRasmussenParameters()) in case other parameters need to be used Loading