QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: zhangguangping on August 19, 2024, 09:51

Title: Can not do geometry optimization using PlaneWaveCalculator with PAW potentials
Post by: zhangguangping on August 19, 2024, 09:51
Dear ATK staff,

I have tried to use potentials PlaneWaveCalculator with PAW pseudopotential method to do geometry optimization. However, errors always occur as following:
===========
    sys.exit(__run_atkpython())
  File "zipdir/ATKExecutables/atkwrappers/__init__.py", line 879, in __run_atkpython
  File "O-PW-GPAW.py", line 65, in <module>
    bulk_configuration = OptimizeGeometry(
  File "zipdir/NL/Dynamics/Optimization/OptimizeGeometry.py", line 605, in OptimizeGeometry
  File "zipdir/NL/Dynamics/Optimization/OptimizeGeometry.py", line 1380, in runRelaxation
  File "zipdir/NL/Dynamics/Optimization/OptimizeGeometry.py", line 885, in atomicForces
  File "zipdir/NL/Dynamics/Optimization/OptimizeGeometry.py", line 794, in _update
  File "zipdir/NL/Dynamics/MolecularDynamics/DynamicsEnergyForcesStress.py", line 30, in wrapped_analysis
  File "zipdir/NL/Calculators/DensityFunctionalTheory/LCAOCalculator/Analysis/FastEnergyForcesStress.py", line 35, in energyFunction
  File "zipdir/NL/Calculators/DensityFunctionalTheory/LCAOCalculator/Analysis/FastEnergyForcesStress.py", line 72, in _checkAndUpdate
  File "zipdir/NL/Calculators/DensityFunctionalTheory/LCAOCalculator/Analysis/FastEnergyForcesStress.py", line 104, in _update
  File "zipdir/NL/Calculators/DensityFunctionalTheory/PlaneWaveCalculator/Analysis/EnergyForcesStress.py", line 99, in calculatePlaneWaveEnergyForcesStressFast
  File "zipdir/NL/ComputerScienceUtilities/Flowchart.py", line 685, in execute
  File "zipdir/NL/ComputerScienceUtilities/Flowchart.py", line 676, in executeBlock
  File "zipdir/NL/Calculators/DensityFunctionalTheory/PAW/Blocks/ElectronDifferenceDensity.py", line 62, in execute
TypeError: calculateElectronDifferenceDensity() takes 4 positional arguments but 6 were given
application called MPI_Abort(MPI_COMM_WORLD, 1) - process 9
==========

How can I fix this problem? Or it is the feature of PAW pseudopotential method? The single-point energy calculations are OK.

With best regards,

/Guang-Ping Zhang
Title: Re: Can not do geometry optimization using PlaneWaveCalculator with PAW potentials
Post by: Anders Blom on August 27, 2024, 01:32
Code version?
Title: Re: Can not do geometry optimization using PlaneWaveCalculator with PAW potentials
Post by: zhangguangping on August 27, 2024, 12:27
Code version?

Dear Anders, it is 2022.12-SP1.
Title: Re: Can not do geometry optimization using PlaneWaveCalculator with PAW potentials
Post by: Anders Blom on August 31, 2024, 00:05
I don't recall exactly when we added stress to the planewave model. We can try to run your script in the new version if you share it, but we can't support the old version.
Title: Re: Can not do geometry optimization using PlaneWaveCalculator with PAW potentials
Post by: zhangguangping on September 1, 2024, 05:57
I don't recall exactly when we added stress to the planewave model. We can try to run your script in the new version if you share it, but we can't support the old version.

Dear Anders,

Thanks for your kind reply. Please find the attached .py file.

With best regards,

/Guang-Ping Zhang
Title: Re: Can not do geometry optimization using PlaneWaveCalculator with PAW potentials
Post by: Anders Blom on September 5, 2024, 21:30
Note that there is no 2022.12 version, as you wrote...

I have no problems running this in V-2023.12-SP1, it converged in about 8 minutes on my laptop.
Title: Re: Can not do geometry optimization using PlaneWaveCalculator with PAW potentials
Post by: zhangguangping on September 6, 2024, 02:03
Note that there is no 2022.12 version, as you wrote...

I have no problems running this in V-2023.12-SP1, it converged in about 8 minutes on my laptop.

Thanks for your kind reply. It is exactly U-2022.12-SP1.

With best regards,
/Guang-Ping Zhang
Title: Re: Can not do geometry optimization using PlaneWaveCalculator with PAW potentials
Post by: Anders Blom on September 6, 2024, 09:21
Apologies, our release schedule changed recently, so I was counting 9 months backwards and could not match this version by year/month, but yes, we actually had only a 3 month release gap in 2023, I forgot that...

Anyway, seems to be a bug in the old version, but as mentioned it works fine in the current release.