QuantumATK Forum
QuantumATK => General Questions and Answers => Topic started by: jalmeida on October 4, 2023, 10:02
-
Hello,
I am trying to optimize a bulk configuration without change the unit cell. However I got an error that this flag does not belong to the class OptimizeGeometry! Please, What could be the problem?
My script:
bulk_configuration = nlread('/path/bulk.hdf5', BulkConfiguration)[0]
# -------------------------------------------------------------
# Optimize Geometry
# -------------------------------------------------------------
constraints = None
bulk_configuration = OptimizeGeometry(
bulk_configuration,
max_forces=0.02*eV/Ang,
max_steps=50,
max_step_length=0.2*Ang,
constraints=constraints,
optimize_cell=False,
trajectory_filename='bulk_trajectory.hdf5',
restart_strategy=RestartFromTrajectory(),
disable_stress=True,
optimizer_method=LBFGS(),
)
nlsave('bulk.hdf5', bulk_configuration)
nlprint(bulk_configuration)
The error:
File "bulk.py", line 9, in <module>
bulk_configuration = OptimizeGeometry(
TypeError: OptimizeGeometry() got an unexpected keyword argument 'optimize_cell'
application called MPI_Abort(MPI_COMM_WORLD, 1) - process 38
/tmp2/slurmd/job143810/slurm_script : ligne 50 : 261141 Erreur de segmentation mpiexec -n 44 atkpython $job.py > $job.out
-
Looks like you are running the script with an older version than the one used to generate the script. The "optimize_cell" keyword was added in one of the more recent releases, so older releases would not recognize it.
-
Dear,
Thank you. So if I use < disable_stress=True > means the same in my version (2021.06)?
Best,
Joseane
-
Correct
-
Okay, thank you!