Author Topic: constraints of 2D materials  (Read 23839 times)

0 Members and 1 Guest are viewing this topic.

Offline Roc2019

  • Heavy QuantumATK user
  • ***
  • Posts: 57
  • Country: cn
  • Reputation: 0
    • View Profile
constraints of 2D materials
« on: July 15, 2025, 15:56 »
Dear Developers,

How to do the constrain cell (i.e., Z axis) and constrain space group simultaneously for the geometric optimization of 2D materials?

It seems that the three constrains (cell, space group, and Bravais lattice) only work for one case, not more than two choices.

Thanks.

Roc

HTU

   

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5749
  • Country: dk
  • Reputation: 112
    • View Profile
    • QuantumATK at Synopsys
Re: constraints of 2D materials
« Reply #1 on: July 16, 2025, 15:38 »
It looks like the GUI doesn't set this up correctly, but you can do it in a script, by changing the "contraints" argument to OptimizeGeometry manually:
Code: python
optimized_configuration = OptimizeGeometry(
    configuration=molybdenite,
    constraints=[FixStrain(False, False, True), SpaceGroupConstraint()],
    trajectory_filename='Molybdenite_results.hdf5',
    trajectory_object_id='optimize_trajectory',
    optimize_cell=True,
    restart_strategy=restart_strategy,
)