NPT_F with surfaces

243 views
Skip to first unread message

Massimo Delle Piane

unread,
Jan 24, 2014, 6:22:20 AM1/24/14
to cp...@googlegroups.com
Hi,
I would like to perform a MD simulation with the NPT ensemble with flexible cell. I did it before, but this time I would like to study a surface model, therefore I need to allow changes only in the a and b parameters while keeping c fixed.
I cannot understand what the right combination should be to obtain this result.
Thank you in advance,

Massimo

hut...@chem.uzh.ch

unread,
Jan 24, 2014, 10:33:39 AM1/24/14
to cp...@googlegroups.com
Hi

it seems that nobody implemented yet constraints on the
cell variables. We had it in CPMD but this didn't made it
into CP2K yet.

regards

Juerg Hutter

--------------------------------------------------------------
Juerg Hutter Phone : ++41 44 635 4491
Institut für Chemie FAX : ++41 44 635 6838
Universität Zürich E-mail: hut...@chem.uzh.ch
Winterthurerstrasse 190
CH-8057 Zürich, Switzerland
---------------------------------------------------------------

-----cp...@googlegroups.com wrote: -----
To: cp...@googlegroups.com
From: Massimo Delle Piane
Sent by: cp...@googlegroups.com
Date: 01/24/2014 12:22PM
Subject: [CP2K:4915] NPT_F with surfaces
--
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns...@googlegroups.com.
To post to this group, send email to cp...@googlegroups.com.
Visit this group at http://groups.google.com/group/cp2k.
For more options, visit https://groups.google.com/groups/opt_out.

marci

unread,
Jan 24, 2014, 10:43:04 AM1/24/14
to cp...@googlegroups.com
Hi,

You shouldn't need such a constraint for a slab model. The stress tensor in the direction perpendicular to the surface should be zero. Hence, the cell should not change in that direction.

regards
Marcella

Florian Schiffmann

unread,
Jan 26, 2014, 5:49:33 AM1/26/14
to cp...@googlegroups.com
Hi,

what Marcella says is correct in an ideal world. In reality there are numerics,... if it happens that your cell changes or you want to be on the save side, you might want to set the cell gradient in the nonperiodic direction to a perfect 0.
This can be done in the cell_opt_utils.F at the end of the subroutine get_dg_dh.
simply set gradient(n)=0.0_dp (n=1 for x, n=3 for y, n=6 for z as np direction).
Recompile and your cell is fixed in that direction.

Flo

Marcelo Carignano

unread,
Jun 25, 2018, 2:16:41 PM6/25/18
to cp2k
Hello,

I see at the end of cell_opt_utils.F (V 5.1) the code copied below suggesting that different constraints for the box deformation can be defined.
It is a CASE statement using my_constraint_id as argument.

How and where can this variable be defined? I do not see how to control this from the input.
Should I (hard) define constraint_id and recompile?

Thanks,

Marcelo.

      SELECT CASE (my_constraint_id)

      CASE (fix_x)

         gradient(1:2) = 0.0_dp

         gradient(4) = 0.0_dp

      CASE (fix_y)

         gradient(2:3) = 0.0_dp

         gradient(5) = 0.0_dp

      CASE (fix_z)

         gradient(4:6) = 0.0_dp

      CASE (fix_xy)

         gradient(1:5) = 0.0_dp

      CASE (fix_xz)

         gradient(1:2) = 0.0_dp

         gradient(4:6) = 0.0_dp

      CASE (fix_yz)

         gradient(2:6) = 0.0_dp

      CASE (fix_none)

         ! Nothing to do

      END SELECT

Message has been deleted

Marcelo Carignano

unread,
Jun 26, 2018, 2:32:19 AM6/26/18
to cp2k
Thank you Travis, 
I think I didn't explain myself correctly.
The original post from Massimo is about performing NPT_F MD simulations keeping one of the box dimensions fixed. 
A reply indicated that that could be done by a modification of the code, cell_opt_utils.F
After checking that file I see that those options are already coded, but perhaps this is only for CELL_OPT and not for RUN_TYPE MD

Now, looking back I see that the referred file is cell_opt_util.F and no md_utils.F, which makes me wonder if the comment from Florian was indeed referring to MD or CELL_OPT.

Then... is it possible to run an MD, under NPT_F conditions for a slab system and keeping the constant dimension of the box normal to the slab??
With a little hint of the developers I can do this change myself.

Thanks,

Marcelo.

On Monday, June 25, 2018 at 11:35:04 PM UTC+3, Travis wrote:
Reply all
Reply to author
Forward
0 new messages