Ferroelectric job error

Question posted by Bikash

Dear experts,

I have been facing trouble with polarization calculation using atomate. The job starts and gets fizzled after static run of both the polar and non-polar structure. This is my python script for calculation.

from atomate.vasp.workflows.base.ferroelectric import get_wf_ferroelectric
import numpy as np
from pymatgen import Structure
from fireworks import LaunchPad
polar = Structure.from_file(‘BTO_polar_POSCAR’)
nonpolar = Structure.from_file(‘BTO_nonpolar_POSCAR’)
wf = get_wf_ferroelectric(polar_structure=polar, nonpolar_structure=nonpolar, vasp_cmd="/home/tddft/Code/vasp_original/bin/vasp_std", db_file=None,vasp_input_set_polar=“MPStaticSet”,vasp_input_set_nonpolar=“MPStaticSet”,relax=False, vasp_relax_input_set_polar=None, vasp_relax_input_set_nonpolar=None, nimages=5, hse=False, add_analysis_task=False, wfid=None,tags=None)
lpad = LaunchPad.auto_load()
lpad.add_wf(wf)

I am getting the following error -

# (atomate_env) tddft@dft:~/Project/atomate_check/ferroelectric/BaTiO3$ python ferro.py
2019-11-09 11:52:24,953 INFO Added a workflow. id_map: {-12: 1, -10: 2, -8: 3, -6: 4, -4: 5, -2: 6}
(atomate_env) tddft@dft:~/Project/atomate_check/ferroelectric/BaTiO3$ rlaunch rapidfire
2019-11-09 11:52:37,951 INFO Hostname/IP lookup (this will take a few seconds)
2019-11-09 11:52:38,814 INFO Created new dir /home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-22-38-814063
2019-11-09 11:52:38,814 INFO Launching Rocket
2019-11-09 11:52:38,830 INFO RUNNING fw_id: 5 in directory: /home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-22-38-814063
2019-11-09 11:52:38,837 INFO Task started: {{atomate.vasp.firetasks.write_inputs.WriteVaspFromIOSet}}.
2019-11-09 11:52:38,850 INFO Task completed: {{atomate.vasp.firetasks.write_inputs.WriteVaspFromIOSet}}
2019-11-09 11:52:38,852 INFO Task started: {{atomate.vasp.firetasks.run_calc.RunVaspCustodian}}.
2019-11-09 11:54:30,825 INFO Task completed: {{atomate.vasp.firetasks.run_calc.RunVaspCustodian}}
2019-11-09 11:54:30,828 INFO Task started: {{atomate.common.firetasks.glue_tasks.PassCalcLocs}}.
2019-11-09 11:54:30,828 INFO Task completed: {{atomate.common.firetasks.glue_tasks.PassCalcLocs}}
2019-11-09 11:54:30,830 INFO Task started: {{atomate.vasp.firetasks.parse_outputs.VaspToDb}}.
2019-11-09 11:54:30,830 INFO atomate.vasp.firetasks.parse_outputs PARSING DIRECTORY: /home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-22-38-814063
2019-11-09 11:54:30,830 INFO atomate.vasp.drones Getting task doc for base dir :/home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-22-38-814063
2019-11-09 11:54:31,499 INFO atomate.vasp.drones Post-processing dir:/home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-22-38-814063
2019-11-09 11:54:31,500 WARNING atomate.vasp.drones Transformations file does not exist.
2019-11-09 11:54:31,531 INFO atomate.vasp.drones Post-processed /home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-22-38-814063
2019-11-09 11:54:31,532 INFO Task completed: {{atomate.vasp.firetasks.parse_outputs.VaspToDb}}
2019-11-09 11:54:31,534 INFO Task started: {{atomate.vasp.firetasks.glue_tasks.CheckBandgap}}.
2019-11-09 11:54:31,534 INFO atomate.vasp.firetasks.glue_tasks Checking the gap of file: vasprun.xml.gz
2019-11-09 11:54:31,600 INFO atomate.vasp.firetasks.glue_tasks The gap is: 1.7403999999999997. Min gap: 0.01. Max gap: None
2019-11-09 11:54:31,600 INFO Task completed: {{atomate.vasp.firetasks.glue_tasks.CheckBandgap}}
2019-11-09 11:54:31,602 INFO Task started: {{atomate.common.firetasks.glue_tasks.CreateFolder}}.
2019-11-09 11:54:31,602 INFO Task completed: {{atomate.common.firetasks.glue_tasks.CreateFolder}}
2019-11-09 11:54:31,604 INFO Task started: {{atomate.vasp.firetasks.glue_tasks.CopyVaspOutputs}}.
2019-11-09 11:54:31,751 INFO Task completed: {{atomate.vasp.firetasks.glue_tasks.CopyVaspOutputs}}
2019-11-09 11:54:31,753 INFO Task started: {{atomate.vasp.firetasks.write_inputs.ModifyIncar}}.
2019-11-09 11:54:31,753 INFO Task completed: {{atomate.vasp.firetasks.write_inputs.ModifyIncar}}
2019-11-09 11:54:31,755 INFO Task started: {{atomate.vasp.firetasks.run_calc.RunVaspCustodian}}.
2019-11-09 11:56:23,563 INFO Task completed: {{atomate.vasp.firetasks.run_calc.RunVaspCustodian}}
2019-11-09 11:56:23,565 INFO Task started: {{atomate.common.firetasks.glue_tasks.PassCalcLocs}}.
2019-11-09 11:56:23,565 INFO Task completed: {{atomate.common.firetasks.glue_tasks.PassCalcLocs}}
2019-11-09 11:56:23,567 INFO Task started: {{atomate.vasp.firetasks.parse_outputs.VaspToDb}}.
2019-11-09 11:56:23,567 INFO atomate.vasp.firetasks.parse_outputs PARSING DIRECTORY: /home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-22-38-814063/polarization
2019-11-09 11:56:23,567 INFO atomate.vasp.drones Getting task doc for base dir :/home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-22-38-814063/polarization
2019-11-09 11:56:24,296 INFO atomate.vasp.drones Post-processing dir:/home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-22-38-814063/polarization
2019-11-09 11:56:24,297 WARNING atomate.vasp.drones Transformations file does not exist.
2019-11-09 11:56:24,329 INFO atomate.vasp.drones Post-processed /home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-22-38-814063/polarization
2019-11-09 11:56:24,330 INFO Task completed: {{atomate.vasp.firetasks.parse_outputs.VaspToDb}}
2019-11-09 11:56:24,357 INFO Rocket finished
2019-11-09 11:56:24,360 INFO Created new dir /home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-26-24-360342
2019-11-09 11:56:24,360 INFO Launching Rocket
2019-11-09 11:56:24,385 INFO RUNNING fw_id: 6 in directory: /home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-26-24-360342
2019-11-09 11:56:24,391 INFO Task started: {{atomate.vasp.firetasks.write_inputs.WriteVaspFromIOSet}}.
2019-11-09 11:56:24,400 INFO Task completed: {{atomate.vasp.firetasks.write_inputs.WriteVaspFromIOSet}}
2019-11-09 11:56:24,403 INFO Task started: {{atomate.vasp.firetasks.run_calc.RunVaspCustodian}}.
2019-11-09 11:59:27,013 INFO Task completed: {{atomate.vasp.firetasks.run_calc.RunVaspCustodian}}
2019-11-09 11:59:27,016 INFO Task started: {{atomate.common.firetasks.glue_tasks.PassCalcLocs}}.
2019-11-09 11:59:27,016 INFO Task completed: {{atomate.common.firetasks.glue_tasks.PassCalcLocs}}
2019-11-09 11:59:27,018 INFO Task started: {{atomate.vasp.firetasks.parse_outputs.VaspToDb}}.
2019-11-09 11:59:27,018 INFO atomate.vasp.firetasks.parse_outputs PARSING DIRECTORY: /home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-26-24-360342
2019-11-09 11:59:27,018 INFO atomate.vasp.drones Getting task doc for base dir :/home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-26-24-360342
2019-11-09 11:59:27,754 INFO atomate.vasp.drones Post-processing dir:/home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-26-24-360342
2019-11-09 11:59:27,754 WARNING atomate.vasp.drones Transformations file does not exist.
2019-11-09 11:59:27,783 INFO atomate.vasp.drones Post-processed /home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-26-24-360342
2019-11-09 11:59:27,784 INFO Task completed: {{atomate.vasp.firetasks.parse_outputs.VaspToDb}}
2019-11-09 11:59:27,786 INFO Task started: {{atomate.vasp.firetasks.glue_tasks.CheckBandgap}}.
2019-11-09 11:59:27,786 INFO atomate.vasp.firetasks.glue_tasks Checking the gap of file: vasprun.xml.gz
2019-11-09 11:59:27,871 INFO atomate.vasp.firetasks.glue_tasks The gap is: 1.8434000000000004. Min gap: 0.01. Max gap: None
2019-11-09 11:59:27,871 INFO Task completed: {{atomate.vasp.firetasks.glue_tasks.CheckBandgap}}
2019-11-09 11:59:27,873 INFO Task started: {{atomate.common.firetasks.glue_tasks.CreateFolder}}.
2019-11-09 11:59:27,873 INFO Task completed: {{atomate.common.firetasks.glue_tasks.CreateFolder}}
2019-11-09 11:59:27,874 INFO Task started: {{atomate.vasp.firetasks.glue_tasks.CopyVaspOutputs}}.
2019-11-09 11:59:28,139 INFO Task completed: {{atomate.vasp.firetasks.glue_tasks.CopyVaspOutputs}}
2019-11-09 11:59:28,141 INFO Task started: {{atomate.vasp.firetasks.write_inputs.ModifyIncar}}.
2019-11-09 11:59:28,141 INFO Task completed: {{atomate.vasp.firetasks.write_inputs.ModifyIncar}}
2019-11-09 11:59:28,143 INFO Task started: {{atomate.vasp.firetasks.run_calc.RunVaspCustodian}}.
2019-11-09 12:01:20,914 INFO Task completed: {{atomate.vasp.firetasks.run_calc.RunVaspCustodian}}
2019-11-09 12:01:20,917 INFO Task started: {{atomate.common.firetasks.glue_tasks.PassCalcLocs}}.
2019-11-09 12:01:20,917 INFO Task completed: {{atomate.common.firetasks.glue_tasks.PassCalcLocs}}
2019-11-09 12:01:20,920 INFO Task started: {{atomate.vasp.firetasks.parse_outputs.VaspToDb}}.
2019-11-09 12:01:20,920 INFO atomate.vasp.firetasks.parse_outputs PARSING DIRECTORY: /home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-26-24-360342/polarization
2019-11-09 12:01:20,920 INFO atomate.vasp.drones Getting task doc for base dir :/home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-26-24-360342/polarization
2019-11-09 12:01:21,754 INFO atomate.vasp.drones Post-processing dir:/home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-26-24-360342/polarization
2019-11-09 12:01:21,754 WARNING atomate.vasp.drones Transformations file does not exist.
2019-11-09 12:01:21,786 INFO atomate.vasp.drones Post-processed /home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-26-24-360342/polarization
2019-11-09 12:01:21,788 INFO Task completed: {{atomate.vasp.firetasks.parse_outputs.VaspToDb}}
2019-11-09 12:01:21,824 INFO Rocket finished
2019-11-09 12:01:21,829 INFO Created new dir /home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-31-21-829239
2019-11-09 12:01:21,829 INFO Launching Rocket
2019-11-09 12:01:21,842 INFO RUNNING fw_id: 1 in directory: /home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-31-21-829239
2019-11-09 12:01:21,846 INFO Task started: {{atomate.vasp.firetasks.write_inputs.WriteVaspFromIOSetFromInterpolatedPOSCAR}}.
Traceback (most recent call last):
File “/home/tddft/atomate/atomate_env/lib/python3.7/site-packages/fireworks/core/rocket.py”, line 262, in run
m_action = t.run_task(my_spec)
File “/home/tddft/atomate/atomate_env/lib/python3.7/site-packages/atomate/vasp/firetasks/write_inputs.py”, line 96, in run_task
structure = GetInterpolatedPOSCAR.interpolate_poscar(self, fw_spec)
File “/home/tddft/atomate/atomate_env/lib/python3.7/site-packages/atomate/vasp/firetasks/glue_tasks.py”, line 263, in interpolate_poscar
name_append="_0").run_task(fw_spec=fw_spec)
File “/home/tddft/atomate/atomate_env/lib/python3.7/site-packages/fireworks/core/firework.py”, line 70, in  **init**
raise RuntimeError(“Invalid keyword argument specified for: {}. You specified: {}. Allowed values are: {}.”.format(self. **class** , k, allowed_params))
RuntimeError: Invalid keyword argument specified for: <class ‘atomate.common.firetasks.glue_tasks.CopyFilesFromCalcLoc’>. You specified: calc_dir. Allowed values are: [‘calc_loc’, ‘filenames’, ‘name_prepend’, ‘name_append’].
2019-11-09 12:01:21,858 INFO Rocket finished
2019-11-09 12:01:21,862 INFO Created new dir /home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-31-21-862286
2019-11-09 12:01:21,862 INFO Launching Rocket
2019-11-09 12:01:21,877 INFO RUNNING fw_id: 2 in directory: /home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-31-21-862286
2019-11-09 12:01:21,880 INFO Task started: {{atomate.vasp.firetasks.write_inputs.WriteVaspFromIOSetFromInterpolatedPOSCAR}}.
Traceback (most recent call last):
File “/home/tddft/atomate/atomate_env/lib/python3.7/site-packages/fireworks/core/rocket.py”, line 262, in run
m_action = t.run_task(my_spec)
File “/home/tddft/atomate/atomate_env/lib/python3.7/site-packages/atomate/vasp/firetasks/write_inputs.py”, line 96, in run_task
structure = GetInterpolatedPOSCAR.interpolate_poscar(self, fw_spec)
File “/home/tddft/atomate/atomate_env/lib/python3.7/site-packages/atomate/vasp/firetasks/glue_tasks.py”, line 263, in interpolate_poscar
name_append="_0").run_task(fw_spec=fw_spec)
File “/home/tddft/atomate/atomate_env/lib/python3.7/site-packages/fireworks/core/firework.py”, line 70, in  **init**
raise RuntimeError(“Invalid keyword argument specified for: {}. You specified: {}. Allowed values are: {}.”.format(self. **class** , k, allowed_params))
RuntimeError: Invalid keyword argument specified for: <class ‘atomate.common.firetasks.glue_tasks.CopyFilesFromCalcLoc’>. You specified: calc_dir. Allowed values are: [‘calc_loc’, ‘filenames’, ‘name_prepend’, ‘name_append’].
2019-11-09 12:01:21,894 INFO Rocket finished
2019-11-09 12:01:21,898 INFO Created new dir /home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-31-21-898725
2019-11-09 12:01:21,899 INFO Launching Rocket
2019-11-09 12:01:21,912 INFO RUNNING fw_id: 3 in directory: /home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-31-21-898725
2019-11-09 12:01:21,916 INFO Task started: {{atomate.vasp.firetasks.write_inputs.WriteVaspFromIOSetFromInterpolatedPOSCAR}}.
Traceback (most recent call last):
File “/home/tddft/atomate/atomate_env/lib/python3.7/site-packages/fireworks/core/rocket.py”, line 262, in run
m_action = t.run_task(my_spec)
File “/home/tddft/atomate/atomate_env/lib/python3.7/site-packages/atomate/vasp/firetasks/write_inputs.py”, line 96, in run_task
structure = GetInterpolatedPOSCAR.interpolate_poscar(self, fw_spec)
File “/home/tddft/atomate/atomate_env/lib/python3.7/site-packages/atomate/vasp/firetasks/glue_tasks.py”, line 263, in interpolate_poscar
name_append="_0").run_task(fw_spec=fw_spec)
File “/home/tddft/atomate/atomate_env/lib/python3.7/site-packages/fireworks/core/firework.py”, line 70, in  **init**
raise RuntimeError(“Invalid keyword argument specified for: {}. You specified: {}. Allowed values are: {}.”.format(self. **class** , k, allowed_params))
RuntimeError: Invalid keyword argument specified for: <class ‘atomate.common.firetasks.glue_tasks.CopyFilesFromCalcLoc’>. You specified: calc_dir. Allowed values are: [‘calc_loc’, ‘filenames’, ‘name_prepend’, ‘name_append’].
2019-11-09 12:01:21,929 INFO Rocket finished
2019-11-09 12:01:21,932 INFO Created new dir /home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-31-21-932771
2019-11-09 12:01:21,933 INFO Launching Rocket
2019-11-09 12:01:21,950 INFO RUNNING fw_id: 4 in directory: /home/tddft/Project/atomate_check/ferroelectric/BaTiO3/launcher_2019-11-09-06-31-21-932771
2019-11-09 12:01:21,954 INFO Task started: {{atomate.vasp.firetasks.write_inputs.WriteVaspFromIOSetFromInterpolatedPOSCAR}}.
Traceback (most recent call last):
File “/home/tddft/atomate/atomate_env/lib/python3.7/site-packages/fireworks/core/rocket.py”, line 262, in run
m_action = t.run_task(my_spec)
File “/home/tddft/atomate/atomate_env/lib/python3.7/site-packages/atomate/vasp/firetasks/write_inputs.py”, line 96, in run_task
structure = GetInterpolatedPOSCAR.interpolate_poscar(self, fw_spec)
File “/home/tddft/atomate/atomate_env/lib/python3.7/site-packages/atomate/vasp/firetasks/glue_tasks.py”, line 263, in interpolate_poscar
name_append="_0").run_task(fw_spec=fw_spec)
File “/home/tddft/atomate/atomate_env/lib/python3.7/site-packages/fireworks/core/firework.py”, line 70, in  **init**
raise RuntimeError(“Invalid keyword argument specified for: {}. You specified: {}. Allowed values are: {}.”.format(self. **class** , k, allowed_params))
RuntimeError: Invalid keyword argument specified for: <class ‘atomate.common.firetasks.glue_tasks.CopyFilesFromCalcLoc’>. You specified: calc_dir. Allowed values are: [‘calc_loc’, ‘filenames’, ‘name_prepend’, ‘name_append’].
2019-11-09 12:01:21,965 INFO Rocket finished

with regards,
Bikash.

Hi Bikash,

This appears to be a bug in the GetInterpolatedPOSCAR FireTask. I’m looking into this now.

Best,
Alex

Hi Bikash,

This bug has now been fixed in the latest version of atomate on GitHub.

Best,
Alex

Dear Alex,

Thanks for the update.

Now with the updated version from GitHub, I am getting the following error after both polar and non-polar run:

2019-11-22 12:11:58,651 INFO RUNNING fw_id: 10 in directory: /home/tddft/Project/atomate_check/ferroelectric/BaTiO3_new/launcher_2019-11-22-06-41-58-640980
2019-11-22 12:11:58,654 INFO Task started: {{atomate.vasp.firetasks.write_inputs.WriteVaspFromIOSetFromInterpolatedPOSCAR}}.
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/fireworks/core/rocket.py", line 262, in run
    m_action = t.run_task(my_spec)
  File "/usr/local/lib/python3.7/site-packages/atomate-0.9.4-py3.7.egg/atomate/vasp/firetasks/write_inputs.py", line 96, in run_task
    structure = GetInterpolatedPOSCAR.interpolate_poscar(self, fw_spec)
  File "/usr/local/lib/python3.7/site-packages/atomate-0.9.4-py3.7.egg/atomate/vasp/firetasks/glue_tasks.py", line 263, in interpolate_poscar
    name_append="_0").run_task(fw_spec=fw_spec)
  File "/usr/local/lib/python3.7/site-packages/atomate-0.9.4-py3.7.egg/atomate/common/firetasks/glue_tasks.py", line 126, in run_task
    fileclient.copy(prev_path_full, dest_path)
  File "/usr/local/lib/python3.7/site-packages/atomate-0.9.4-py3.7.egg/atomate/utils/fileio.py", line 111, in copy
    shutil.copy2(src, dest)
  File "/usr/local/lib/python3.7/shutil.py", line 257, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/local/lib/python3.7/shutil.py", line 120, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/home/tddft/Project/atomate_check/ferroelectric/BaTiO3_new/launcher_2019-11-22-06-37-11-438984/CONTCAR'
2019-11-22 12:11:58,671 INFO Rocket finished

However, this problem is solved when I set {‘gzip_output’: False} in run_calc.py inside /atomate/vasp/firetasks at line no. 122.

Best,
Bikash

I am running into another error with the interpolation on the Ferroelectric workflow. The polar_polarization and nonpolar_polarization run just fine, and new launchers are created with the interpolate file containing CONTCAR_0 and CONTCAR_1. However, I am getting the following error:

Traceback (most recent call last):
File “/zhome/calebh27/atomate/atomate_env/lib/python3.8/site-packages/fireworks/core/rocket.py”, line 262, in run
m_action = t.run_task(my_spec)
File “/zhome/calebh27/atomate/atomate_env/lib/python3.8/site-packages/atomate/vasp/firetasks/write_inputs.py”, line 133, in run_task
structure = GetInterpolatedPOSCAR.interpolate_poscar(self, fw_spec)
File “/zhome/calebh27/atomate/atomate_env/lib/python3.8/site-packages/atomate/vasp/firetasks/glue_tasks.py”, line 286, in interpolate_poscar
structs = s1.interpolate(s2, self[“nimages”], interpolate_lattices=True,
File “/zhome/calebh27/atomate/atomate_env/lib/python3.8/site-packages/pymatgen/core/structure.py”, line 1766, in interpolate
raise ValueError(“Structures have different lengths!”)
ValueError: Structures have different lengths!`

The first two arguments for the interpolate function in pymatgen are
interpolate( self, end_structure: Union["IStructure", "Structure"]... )
and that error is raised if len(self) != len(end_structure). I am not sure why they are different.
Thanks,
Caleb