@@ -20,6 +20,7 @@ def calculate_elastic(
2020 code = "vasp" ,
2121 anaddbfile = None ,
2222 qe_outfile = None ,
23+ qe_infile = None ,
2324 adjust_pressure = True ,
2425 verbose = True ,
2526 outfile = "elastic_properties.txt" ,
@@ -46,6 +47,8 @@ def calculate_elastic(
4647 Path to the DDB file (applicable only in abinit). The default is None.
4748 qe_outfile : str, optional
4849 Path to the Quantum Espresso output file. The default is None.
50+ qe_infile : str, optional
51+ Path to the Quantum Espresso input file. The default is None.
4952 adjust_pressure : bool, optional
5053 To adjust the cell pressure according to the output file. The default is True.
5154 verbose : str, optional
@@ -61,7 +64,7 @@ def calculate_elastic(
6164
6265 """
6366 # Check if infile is present
64- if not os .path .exists (infile ):
67+ if not os .path .exists (infile ) and code == "vasp" :
6568 print ("%s doesn't exist. Exiting." % infile )
6669 sys .exit ()
6770
@@ -91,13 +94,13 @@ def calculate_elastic(
9194 lattice_constant = output .lattice_constant
9295
9396 elif code == "qe_ElaStic" :
94- output = QE_ElaStic_Parser (outfile = qe_outfile , infile = infile )
97+ output = QE_ElaStic_Parser (outfile = qe_outfile , infile = qe_infile )
9598 elastic_tensor = output .elastic_tensor
9699 structure = output .structure
97100 lattice_constant = output .lattice_constant
98101
99102 elif code == "qe_thermo_pw" :
100- output = QE_thermo_pw_Parser (outfile = qe_outfile , infile = infile )
103+ output = QE_thermo_pw_Parser (outfile = qe_outfile , infile = qe_infile )
101104 elastic_tensor = output .elastic_tensor
102105 structure = output .structure
103106 lattice_constant = output .lattice_constant
0 commit comments