MODULE VarTypes
!----------------------------------------------------------------------
!  Copyright 2003-2014 Ecole Normale Supérieure de Lyon, 
!  Centre National de la Recherche Scientifique,
!  Université Claude Bernard Lyon 1. All rights reserved.
!
!  This work is registered with the Agency for the Protection of Programs 
!  as IDDN.FR.001.100009.000.S.P.2014.000.30625
!
!  Authors: P. Fleurat-Lessard, P. Dayal
!  Contact: optnpath@gmail.com
!
! This file is part of "Opt'n Path".
!
!  "Opt'n Path" is free software: you can redistribute it and/or modify
!  it under the terms of the GNU Affero General Public License as
!  published by the Free Software Foundation, either version 3 of the License,
!  or (at your option) any later version.
!
!  "Opt'n Path" is distributed in the hope that it will be useful,
!  but WITHOUT ANY WARRANTY; without even the implied warranty of
!
!  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
!  GNU Affero General Public License for more details.
!
!  You should have received a copy of the GNU Affero General Public License
!  along with "Opt'n Path". If not, see <http://www.gnu.org/licenses/>.
!
! Contact The Office of Technology Licensing, valorisation@ens-lyon.fr,
! for commercial licensing opportunities.
!----------------------------------------------------------------------

  INTEGER, PARAMETER :: KINT=KIND(1)
  INTEGER, PARAMETER :: KREAL=KIND(1.0D0)
  INTEGER(KINT), PARAMETER :: VLCHARS=256, LCHARS=132, SCHARS=32

  Type ListCoord
! Type of the coordinate
! For now: BOND, ANGLE, DIHEDRAL
      CHARACTER(32) :: Type

! Index of the atoms
     INTEGER(KINT) :: At1,At2,At3,At4
! Value of the Coordinate
     REAL(KREAL) :: Value
!! ! This is the value to use to multiply the value to print it in a human readable format
!!     REAL(KREAL) :: PrintFactor
     INTEGER(KINT) :: SignDihedral
     TYPE (ListCoord), POINTER :: Next
  END TYPE ListCoord

  Type Barycenter
     INTEGER(KINT), ALLOCATABLE :: ListAtoms(:) ! Nat max
! Weights is not used for now 
     REAL(KREAL), ALLOCATABLE :: Weights(:) ! Nat max
     TYPE (Barycenter), POINTER :: Next
  END type BARYCENTER


  TYPE Input_Line
     CHARACTER(LCHARS) :: Line
     TYPE (Input_Line), POINTER :: Prev
     TYPE (Input_Line), POINTER :: Next
  END TYPE Input_Line


END MODULE VARTYPES
