Cell input file format (read cell from external file)

David T amazing... at gmail.com
Thu Nov 3 09:31:06 UTC 2016


This is a quite old post but I was wondering the same question and I also 
had some problems.
I think I managed to have the cell read correctly but there are 2 things I 
do not know which I would like to check and understand few things:

>From /home/davide/source/cp2k/cp2k/src/subsys/cell_types.F

   SUBROUTINE parse_cell_line(input_line, cell_itimes, cell_time, h, vol)
      CHARACTER(LEN=*), INTENT(IN)                       :: input_line
      INTEGER, INTENT(OUT)                               :: cell_itimes
      REAL(KIND=dp), INTENT(OUT)                         :: cell_time
      REAL(KIND=dp), DIMENSION(3, 3), INTENT(OUT)        :: h
      REAL(KIND=dp), INTENT(OUT)                         :: vol

      CHARACTER(len=*), PARAMETER :: routineN = 'parse_cell_line', &
         routineP = moduleN//':'//routineN

      INTEGER                                            :: i, j

      READ (input_line, *) cell_itimes, cell_time, &
         h(1, 1), h(2, 1), h(3, 1), h(1, 2), h(2, 2), h(3, 2), h(1, 3), 
h(2, 3), h(3, 3), vol
      DO i = 1, 3
         DO j = 1, 3
            h(j, i) = cp_unit_to_cp2k(h(j, i), "angstrom")
         END DO
      END DO

   END SUBROUTINE parse_cell_line



h is the matrix containing the cell information. my question are:

1) Am I reading the correct part of the code? :-) 

2) what is cell_items? and cell_times?
I put 2 integers just for having the input read correctly. I would like to 
know what is the meaning of those variables

3) I assumed vol stays for volume. Why is that required?
The cell volume is calculated from the matrix h and reported correctly in 
the output. I put 2 fake values and it doesn't seem to change anything.


Cheers
Davide



On Thursday, 22 January 2015 14:18:49 UTC+1, fed... at gmail.com wrote:
>
> I read in the CP2K manual that it is possible to read in the cell data 
> from an external file ( CP2K_INPUT 
> <http://cp2k.web.psi.ch/manual/cp2k-2_4-branch/CP2K_INPUT.html> / 
> FORCE_EVAL 
> <http://cp2k.web.psi.ch/manual/cp2k-2_4-branch/CP2K_INPUT/FORCE_EVAL.html> 
> / SUBSYS 
> <http://cp2k.web.psi.ch/manual/cp2k-2_4-branch/CP2K_INPUT/FORCE_EVAL/SUBSYS.html> 
> / CELL 
> <http://cp2k.web.psi.ch/manual/cp2k-2_4-branch/CP2K_INPUT/FORCE_EVAL/SUBSYS/CELL.html>
> /CELL_FILE_NAME), however I can't find any information on how this file 
> has to look like and my tries were not successful so far.
>
> Does anybody know how this file should look like?
>
> Parsing seems to be done in line 843 of file ../src/cell_types.F using 
> CP2K version 2.4.0
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20161103/24a85f08/attachment.htm>


More information about the CP2K-user mailing list