Author Topic: Question about Defect Diffusion Workflow Template  (Read 82852 times)

0 Members and 1 Guest are viewing this topic.

Offline pshinyeong

  • Heavy QuantumATK user
  • ***
  • Posts: 49
  • Country: kr
  • Reputation: 0
    • View Profile
Question about Defect Diffusion Workflow Template
« on: September 10, 2025, 07:16 »
Hello,

I am trying to use the Defect Diffusion workflow template to calculate the dopant diffusion rate in silicon, and I have a few questions about the setup.

I created an MTP using defect training and used that potential for pre-optimization, phonon calculation, and the LCAO calculator for bandgap and reference calculations. I also added an Element Reference Material block for the dopant chemical potential calculation. Since there is no tutorial available for this workflow template, I am not sure if this setup is correct.

The calculation finished successfully and a diffusion rate result was generated. However, when I click on it, the results table appears empty.
Has anyone experienced this issue before or could provide some guidance on how to resolve it?

Thank you in advance!

Offline pshinyeong

  • Heavy QuantumATK user
  • ***
  • Posts: 49
  • Country: kr
  • Reputation: 0
    • View Profile
Re: Question about Defect Diffusion Workflow Template
« Reply #1 on: September 14, 2025, 07:42 »
I also tried this using LCAO calculator for all 4 calculator but still gave me error
Code
zipdir/NL/Study/Study.py:788: UserWarning: The original file of the Study object '/home/edrl_01/Desktop/1_Diffusion/a_MTP/2_SiB_Defect_Diffusion/2_Trial_2_canceled/2_Trial_2/250912_215415_i1dbrf1h.hdf5' no longer exists.This means no task results will be saved to the new file.
Traceback (most recent call last):
  File "/home/synopsys/quantumatk/X-2025.06/bin/../atkpython/bin/atkpython", line 8, in <module>
    sys.exit(__run_atkpython())
             ^^^^^^^^^^^^^^^^^
  File "zipdir/ATKExecutables/atkwrappers/__init__.py", line 912, in __run_atkpython
Traceback (most recent call last):
  File "/home/synopsys/quantumatk/X-2025.06/bin/../atkpython/bin/atkpython", line 8, in <module>
    sys.exit(__run_atkpython())
             ^^^^^^^^^^^^^^^^^
  File "zipdir/ATKExecutables/atkwrappers/__init__.py", line 912, in __run_atkpython
  File "./defect_diffusion_results.py", line 714, in <module>
    neb_table = generate_nebs_from_defect_migration_paths(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "./defect_diffusion_results.py", line 695, in generate_nebs_from_defect_migration_paths
  File "./defect_diffusion_results.py", line 714, in <module>
    nebs = defect_migration_paths.generateNEBs(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "zipdir/NL/Defects/Migration/DefectMigrationPaths.py", line 538, in generateNEBs
    neb_table = generate_nebs_from_defect_migration_paths(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "./defect_diffusion_results.py", line 695, in generate_nebs_from_defect_migration_paths
    nebs = defect_migration_paths.generateNEBs(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "zipdir/NL/Defects/Migration/DefectMigrationPaths.py", line 538, in generateNEBs
  File "zipdir/NL/Dynamics/Optimization/NudgedElasticBand.py", line 248, in __init__
  File "zipdir/NL/Dynamics/Optimization/NudgedElasticBand.py", line 248, in __init__
  File "zipdir/NL/CommonConcepts/QuantityChecks.py", line 764, in checkAndSetConfigurationList
  File "zipdir/NL/CommonConcepts/QuantityChecks.py", line 764, in checkAndSetConfigurationList
  File "zipdir/NL/CommonConcepts/Configurations/AtomicConfiguration.py", line 2480, in _compare
  File "zipdir/NL/CommonConcepts/Configurations/AtomicConfiguration.py", line 2480, in _compare
NL.ComputerScienceUtilities.Exceptions.NLValueError: The configurations in a NudgedElasticBand are only allowed to differ in the position of the atoms and the cell vectors.
Configuration 1 differs from configuration 0:
The tags of the atoms differ in the compared configurations.
Abort(1) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0
NL.ComputerScienceUtilities.Exceptions.NLValueError: The configurations in a NudgedElasticBand are only allowed to differ in the position of the atoms and the cell vectors.
Configuration 1 differs from configuration 0:
The tags of the atoms differ in the compared configurations.
Abort(1) on node 16 (rank 16 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 1) - process 16
Any help would be appreciated. Thanks

Offline Vaida Arcisauskaite

  • QuantumATK Staff
  • Heavy QuantumATK user
  • *****
  • Posts: 34
  • Country: dk
  • Reputation: 4
    • View Profile
Re: Question about Defect Diffusion Workflow Template
« Reply #2 on: September 15, 2025, 11:26 »
Hello,

Thank you for reporting the issue to us.
1st case with MTP & DFT: could you please provide your mpt,  a workflow hdf5 file and also the result .hdf5 file, so that we could investigate why the results table was empty and how to fix this.

2nd case with DFT only: could you please also provide your workflow .hdf5 file and also the result log file?

Many  thanks, Vaida


Offline Vaida Arcisauskaite

  • QuantumATK Staff
  • Heavy QuantumATK user
  • *****
  • Posts: 34
  • Country: dk
  • Reputation: 4
    • View Profile
Re: Question about Defect Diffusion Workflow Template
« Reply #3 on: September 16, 2025, 10:23 »
Hello,
Thank you for sharing your input and output files for the defect diffusion calculations. Upon review, we noticed that the workflow does not include the calculation of the chemical potential for the dopant atom (Boron). As a result, while the calculation completes, the relevant properties cannot be extracted.

To resolve this, we recommend the following steps (see the attached pdf for instructions with screenshots from the Workflow Builder):

1.   Add a ‘Block of Blocks’ for the Boron Reference Material.

2.   Include the calculated B chemical potential in the ChemicalPotentialTable.
 
3.   Left-click on the ChemicalPotentialTable block to specify the calculator and configurations for the chemical potential calculation.
 
4.   If you wish to include vibrational corrections, specify the phonon_calculator (your trained MachineLearnedForce Field MTP). We recommend using MTP for vibrational corrections instead of DFT to make the calculation feasible.
 
Additionally, we suggest reviewing all block connections in the workflow by left-clicking on each block to verify and adjust settings as needed.

Other observations:
1.   Isotropic Finite Size Corrections
•   If you calculate Optical Spectrum and Elastic constants to extract dielectric constant and bulk modulus values, respectively, that would then be used as parameters in the calculation of Isotropic FiniteSize Corrections, then you need to specify this in the IsotropicFiniteSizeCorrection parameters block.
•   We also recommend specifying a “higher” k-point sampling density for Optical Spectrum.
 
2.   Pristine Material
•   Set the “opgeom” under the PristineMaterial to  Conventional Unit Cell (8 atoms).
•   Then in the PristineConfiguration block  specify Supercell Repetitions 64-atom (2×2×2) or 216-atom (3×3×3) supercells.
 
3. CPD simulation settings
•   Use tighter DFT-LCAO SCF convergence criteria (e.g., 10⁻⁵). Increase the number of max iterations to 200.
•   Increase the  density mesh cutoff in DFT-LCAO — check convergence of total energy with respect to this parameter for the conventional unit cell.
•   Tighten the maximum force tolerance for all geometry optimizations to 0.005.

Please let us know if you have any questions or need further assistance with implementing these changes.

Best regards,
Vaida




Offline pshinyeong

  • Heavy QuantumATK user
  • ***
  • Posts: 49
  • Country: kr
  • Reputation: 0
    • View Profile
Re: Question about Defect Diffusion Workflow Template
« Reply #4 on: September 26, 2025, 11:11 »
Hello , I re-ran the calculation with the corrections previously suggested: Added the chemical potential calculation for the boron atom Tightened the convergence criteria in the calculator Linked the calculators as described in the PDF Despite these changes, the job crashed near the end with the following error:
Code
1_Defect_Diffusion_Workflow/1_Trial_1/250921_003210_4ibppi7p.hdf5' no longer exists.This means no task results will be saved to the new file.
Traceback (most recent call last):
  File "/home/synopsys/quantumatk/X-2025.06/bin/../atkpython/bin/atkpython", line 8, in <module>
    sys.exit(__run_atkpython())
             ^^^^^^^^^^^^^^^^^
  File "zipdir/ATKExecutables/atkwrappers/__init__.py", line 912, in __run_atkpython
  File "./defect_diffusion_MTP_results.py", line 901, in <module>
    filter_migration_pairs_based_on_prerelaxation_calculator_barrier_heights(
  File "./defect_diffusion_MTP_results.py", line 895, in filter_migration_pairs_based_on_prerelaxation_calculator_barrier_heights
    filtered_defect_migration_pairs_table.append(defect_pair_table[index])
  File "zipdir/sergio/HDF5/Table.py", line 2476, in append
  File "zipdir/sergio/HDF5/Table.py", line 1633, in validate
ValueError: The initial_defect column can only contain instances of NamedPointDefect, was list
Abort(1) on node 20 (rank 20 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 1) - process 20
I’ve attached the link to the relevant output files for your review through message, please alert me if the message was not sent because I have sent the message twice but it didn't show up in the sent box. Could you please check where my setup or workflow may be incorrect, particularly around the initial_defect field expected to be a NamedPointDefect? Any guidance on resolving this would be appreciated. Also, this run took a little over three days on 5 nodes (48 cores per node; tasks per node: 6; CPUs per task:; 8 ) before failing. Is this runtime typical for the Defect Diffusion workflow with these settings, or does it suggest a misconfiguration or inefficiency? Thank you in advance for your help.
« Last Edit: October 1, 2025, 00:43 by Anders Blom »

Offline Vaida Arcisauskaite

  • QuantumATK Staff
  • Heavy QuantumATK user
  • *****
  • Posts: 34
  • Country: dk
  • Reputation: 4
    • View Profile
Re: Question about Defect Diffusion Workflow Template
« Reply #5 on: September 29, 2025, 21:29 »
Hello,

Thanks a lot for reporting this.
The issue is probably in the custom block "Filter migration pairs based on Pre-relaxation Calculator barrier heights".
If you convert it to a CustomBlock (right click on the block to do this), and then look at the script, the append function is expecting different values, but it gets a list. If you change it to:

for index, _ in indices_and_barriers:
    filtered_defect_migration_pairs_table.append(*defect_pair_table[index])

(note the additional *) then it should work.

We will further investigate this in the QuantumATK team.

We will also look into errors in the vibrational correction and your calculation timings and come back to you.

Best regards, Vaida
« Last Edit: September 29, 2025, 21:32 by Vaida Arcisauskaite »

Offline Vaida Arcisauskaite

  • QuantumATK Staff
  • Heavy QuantumATK user
  • *****
  • Posts: 34
  • Country: dk
  • Reputation: 4
    • View Profile
Re: Question about Defect Diffusion Workflow Template
« Reply #6 on: October 1, 2025, 16:45 »
Hello,

We have looked into the vibrational correction issues in your charged point defect simulations.

- In the Charged Point Defect Analyzer – if you unclick “Include vibrations”, you will be able to see trap levels without vibrational corrections.
- The error is related to the fact that you have negative frequencies (for B reference/elemental material, look for this warning: “There are 973 non-positive eigenmodes”). And if you do have negative frequencies, you can't calculate the vibrational DOS, and therefore you can't work out vibrationally corrected formation energies and trap levels.
-Now the question is why you have got negative frequencies. The geometry optimization of reference material with your MTP didn’t converge, and doing phonon calculations on an under-optimized structure is not a good idea.

- How to solve this? There are two options
1.  When training an MTP, you need to include elemental B material and some displacements into the training data set. Did you use the PBE functional for generating training dataset?
2. Try using a universal MACE NN potential for vibrational corrections and pre-relaxation instead of the MTP and evaluate the results.

Another thing we have noticed, that your NEB was not converged in many cases within 200 steps and these NEB calculations for diffusion take long time (formation energies/trap levels were done within a couple of hours), explaining long simulation time that you mentioned. We will think about this problematic NEB convergence in your case.

Hope, this helps.

Best regards, Vaida