How to run NPAT ensemble with ase

Hello, all.

How can i use NPAT ensemble with ase?

I usaully used
dyn = NPTBerendsen(atoms, timestep=0.1 * units.fs, temperature_K=300,
taut=100 * units.fs, pressure_au=1.01325 * units.bar,
taup=1000 * units.fs, compressibility_au=4.57e-5 / units.bar)
command to run NPT ensemble.

Now I want to run NPAT ensemble which fix y and z and only force pressure to x direction which is similar with lammps command ’ fix 1 all npt temp 300.0 300.0 100.0 x 1.0 1.0 100.0 ’

Could you give any advice for solving this probrem?
Any help would be appreciated.

Thank you

Do you need to use the Berendsen method? The Melchionna NPT thermostat has a mask parameter that lets you choose which Cartesian axes may change:

https://wiki.fysik.dtu.dk/ase/ase/md.html#module-ase.md.npt

Thank you for your advice!

It was really helpful to me.

Yours Sincerely
Hyeonwoo