QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: Roc2019 on July 15, 2025, 15:56

Title: constraints of 2D materials
Post by: Roc2019 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

   
Title: Re: constraints of 2D materials
Post by: Anders Blom 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,
)