Fixing positions of multiple atoms with different constraints

505 views
Skip to first unread message

Rafael Soler-Crespo

unread,
Apr 11, 2014, 7:33:32 PM4/11/14
to cp...@googlegroups.com
Hi all,

I am trying to do a calculation in which I fix the edges of a sheet (graphene) with different boundary conditions. The calculation is a geometry optimization. The left and right ends of the sheet are constrained to not move in the x direction. The top and bottom parts of the sheet are constrained to not move in the y direction. However, due to how the FIXED_ATOMS section works in CP2K I cannot create different constraints for each end of the sheet (in other words, I am forced to use a global constraint which I do not want). Does anyone know any way to get around this?

For example, I would like to do:

   LIST                                1 2 3 4
   COMPONENTS_TO_FIX    XY
   LIST                                 5 6 7 8
   COMPONENTS_TO_FIX    YZ

However, the code won't let me do that (the keywords appear twice).

Any help will be greatly appreciated.

Thanks,
Rafael

Ari Paavo Seitsonen

unread,
Apr 12, 2014, 12:50:27 AM4/12/14
to cp...@googlegroups.com
Dear Rafael,

  Would it work like

    &FIXED_ATOMS
   LIST                                1 2 3 4
   COMPONENTS_TO_FIX    XY
    &END FIXED_ATOMS

    &FIXED_ATOMS
   LIST                                 5 6 7 8
   COMPONENTS_TO_FIX    YZ
    &END FIXED_ATOMS

it with multiple &FIXED_ATOMS ... &END FIXED ATOMS sections?

    Greetings,

       apsi


--
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/d/optout.



--
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
  Ari Paavo Seitsonen / Ari.P.S...@iki.fi / http://www.iki.fi/~apsi/
  Institut für Chemie der Universität Zürich
  Tel: +41 44 63 55 44 97  /  Mobile: +41 79 71 90 935

Rafael Soler-Crespo

unread,
May 1, 2014, 12:56:11 PM5/1/14
to cp...@googlegroups.com, Ari.P.S...@iki.fi
Dear Apsi,

Just for reference for future users of the code, yes, your solution indeed works.

Thanks for the tip!
Rafael
Reply all
Reply to author
Forward
0 new messages