Author Topic: optimize_cell flag Error  (Read 3560 times)

0 Members and 1 Guest are viewing this topic.

Offline jalmeida

  • Heavy QuantumATK user
  • ***
  • Posts: 36
  • Country: fr
  • Reputation: 0
    • View Profile
optimize_cell flag Error
« 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

Offline Ulrik G. Vej-Hansen

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 426
  • Country: dk
  • Reputation: 9
    • View Profile
Re: optimize_cell flag Error
« Reply #1 on: October 5, 2023, 09:51 »
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.

Offline jalmeida

  • Heavy QuantumATK user
  • ***
  • Posts: 36
  • Country: fr
  • Reputation: 0
    • View Profile
Re: optimize_cell flag Error
« Reply #2 on: November 22, 2023, 10:16 »
Dear,

Thank you. So if I use < disable_stress=True > means the same in my version (2021.06)?

Best,
Joseane

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: optimize_cell flag Error
« Reply #3 on: December 1, 2023, 20:56 »
Correct

Offline jalmeida

  • Heavy QuantumATK user
  • ***
  • Posts: 36
  • Country: fr
  • Reputation: 0
    • View Profile
Re: optimize_cell flag Error
« Reply #4 on: December 15, 2023, 11:38 »

Okay, thank you!