Adding the directory CFLs including Cmake_CFML.info and old Format_CFL.f90 and CFML_IOForm.f90

parent 48550523
Pipeline #7402 failed with stages
in 6 minutes and 44 seconds
......@@ -68,7 +68,7 @@ Module CFML_IOForm
!---- Public subroutines ----!
public :: Read_Xtal_Structure, &
public :: Read_Xtal_Structure, Readn_Set_Xtal_Structure,&
Write_Cif_Template, Write_SHX_Template
!--------------------!
......@@ -116,10 +116,10 @@ Module CFML_IOForm
End Type Job_Info_type
!---- Overloaded Zone ----!
!Interface Readn_Set_Xtal_Structure
! Module Procedure Readn_Set_Xtal_Structure_Split ! For Cell, Spg, A types
! !Module Procedure Readn_Set_Xtal_Structure_Molcr ! For Molecular Crystal Type
!End Interface
Interface Readn_Set_Xtal_Structure
Module Procedure Readn_Set_Xtal_Structure_Split ! For Cell, Spg, A types
!Module Procedure Readn_Set_Xtal_Structure_Molcr ! For Molecular Crystal Type
End Interface
!---- Interface zone ----!
Interface
......@@ -501,75 +501,107 @@ Module CFML_IOForm
!!--++
!!--++ Update: April - 2005, Febraury 2020
!!
!Subroutine Readn_Set_Xtal_Structure_Split(Filenam, Cell, SpG, A,Type_Atm,Mode,Iphase,Job_Info,file_list,CFrame)
!
! select case(modec)
!
! !case("cif")
! ! if (present(iphase)) then
! ! if(present(CFrame)) then
! ! call readn_set_xtal_cif(file_dat,nlines,Cell,Spg, A,CFrame,NPhase=IPhase)
! ! else
! ! call readn_set_xtal_cif(file_dat,nlines,Cell,Spg, A,NPhase=IPhase)
! ! end if
! ! else
! ! if(present(CFrame)) then
! ! call readn_set_xtal_cif(file_dat,nlines,Cell,Spg,A,CFrame)
! ! else
! ! call readn_set_xtal_cif(file_dat,nlines,Cell,Spg,A)
! ! end if
! ! end if
! !
! !case("pcr")
! ! if (present(iphase)) then
! ! if(present(CFrame)) then
! ! call readn_set_xtal_pcr(file_dat,nlines,Cell,Spg, A,CFrame,NPhase=IPhase)
! ! else
! ! call readn_set_xtal_pcr(file_dat,nlines,Cell,Spg, A,NPhase=IPhase)
! ! end if
! ! else
! ! if(present(CFrame)) then
! ! call readn_set_xtal_pcr(file_dat,nlines,Cell,Spg,A,CFrame)
! ! else
! ! call readn_set_xtal_pcr(file_dat,nlines,Cell,Spg,A)
! ! end if
! ! end if
! !
! case default
! !---- CFL Format ----!
! if (present(Job_Info)) then
! if (present(iphase)) then
! if(present(CFrame)) then
! call readn_set_xtal_cfl(file_dat,nlines,Cell,Spg,A,Type_Atm,CFrame,NPhase=IPhase,Job_Info=Job_Info)
! else
! call readn_set_xtal_cfl(file_dat,nlines,Cell,Spg,A,Type_Atm,NPhase=IPhase,Job_Info=Job_Info)
! end if
! else
! if(present(CFrame)) then
! call readn_set_xtal_cfl(file_dat,nlines,Cell,Spg,A,Type_Atm,CFrame,Job_Info=Job_Info)
! else
! call readn_set_xtal_cfl(file_dat,nlines,Cell,Spg,A,Type_Atm,Job_Info=Job_Info)
! end if
! end if
! else
! if (present(iphase)) then
! if(present(CFrame)) then
! call readn_set_xtal_cfl(file_dat,nlines,Cell,Spg,A,Type_Atm,CFrame,NPhase=IPhase)
! else
! call readn_set_xtal_cfl(file_dat,nlines,Cell,Spg,A,Type_Atm,NPhase=IPhase)
! end if
! else
! if(present(CFrame)) then
! call readn_set_xtal_cfl(file_dat,nlines,Cell,Spg,A,Type_Atm,CFrame)
! else
! call readn_set_xtal_cfl(file_dat,nlines,Cell,Spg,A,Type_Atm)
! end if
! end if
! end if
!
! end select
!
!End Subroutine Readn_Set_Xtal_Structure_Split
Subroutine Readn_Set_Xtal_Structure_Split(Filenam, Cell, SpG, A,Type_Atm,Mode,Iphase,Job_Info,file_list,CFrame)
character(len=*), intent( in) :: filenam
Type (Cell_G_Type), intent(out) :: Cell
Type (SpG_Type), intent(out) :: SpG
Type (Atlist_type), intent(out) :: A
Character(len=*), intent( in) :: Type_Atm
Character(len=*), optional, intent( in) :: Mode
Integer, optional, intent( in) :: Iphase
Type(Job_Info_type), optional, intent(out) :: Job_Info
Type(file_type), optional, intent(in out) :: file_list
Character(len=*), optional, intent( in) :: CFrame
!Local variables
character(len=6):: Ext
type(File_Type) :: File_dat
!> Init
call clear_error()
!> Load filename
File_dat=Reading_File(trim(filenam))
if (err_CFML%Ierr /= 0) return
if (File_dat%nlines ==0) then
Err_CFML%Ierr=1
Err_CFML%Msg="Zero lines in the file "//trim(filenam)
return
end if
!> Extension
Ext=get_extension(trim(filenam))
!> Init
call clear_error()
select case(Ext)
!case("cif")
! if (present(iphase)) then
! if(present(CFrame)) then
! call readn_set_xtal_cif(file_dat,nlines,Cell,Spg, A,CFrame,NPhase=IPhase)
! else
! call readn_set_xtal_cif(file_dat,nlines,Cell,Spg, A,NPhase=IPhase)
! end if
! else
! if(present(CFrame)) then
! call readn_set_xtal_cif(file_dat,nlines,Cell,Spg,A,CFrame)
! else
! call readn_set_xtal_cif(file_dat,nlines,Cell,Spg,A)
! end if
! end if
!
!case("pcr")
! if (present(iphase)) then
! if(present(CFrame)) then
! call readn_set_xtal_pcr(file_dat,nlines,Cell,Spg, A,CFrame,NPhase=IPhase)
! else
! call readn_set_xtal_pcr(file_dat,nlines,Cell,Spg, A,NPhase=IPhase)
! end if
! else
! if(present(CFrame)) then
! call readn_set_xtal_pcr(file_dat,nlines,Cell,Spg,A,CFrame)
! else
! call readn_set_xtal_pcr(file_dat,nlines,Cell,Spg,A)
! end if
! end if
!
case default
!---- CFL Format ----!
if (present(Job_Info)) then
if (present(iphase)) then
if(present(CFrame)) then
call readn_set_xtal_cfl(file_dat,nlines,Cell,Spg,A,Type_Atm,CFrame,NPhase=IPhase,Job_Info=Job_Info)
else
call readn_set_xtal_cfl(file_dat,nlines,Cell,Spg,A,Type_Atm,NPhase=IPhase,Job_Info=Job_Info)
end if
else
if(present(CFrame)) then
call readn_set_xtal_cfl(file_dat,nlines,Cell,Spg,A,Type_Atm,CFrame,Job_Info=Job_Info)
else
call readn_set_xtal_cfl(file_dat,nlines,Cell,Spg,A,Type_Atm,Job_Info=Job_Info)
end if
end if
else
if (present(iphase)) then
if(present(CFrame)) then
call readn_set_xtal_cfl(file_dat,nlines,Cell,Spg,A,Type_Atm,CFrame,NPhase=IPhase)
else
call readn_set_xtal_cfl(file_dat,nlines,Cell,Spg,A,Type_Atm,NPhase=IPhase)
end if
else
if(present(CFrame)) then
call readn_set_xtal_cfl(file_dat,nlines,Cell,Spg,A,Type_Atm,CFrame)
else
call readn_set_xtal_cfl(file_dat,nlines,Cell,Spg,A,Type_Atm)
end if
end if
end if
end select
End Subroutine Readn_Set_Xtal_Structure_Split
End Module CFML_IOForm
This diff is collapsed.
Instructions to work with CrysFML and CrysFML08 using Cmake
===========================================================
- Dowload and install Cmake (Windows, Linux or Mac)
- Once Cmake is installed and in the path, go to the CrysFML directory and create a subfolder called "build"
- Within "build", create subdirectories for different compilers and kind of compilations.
Example:
Windows: %CRYSFML%\build\ifort_64_debug
%CRYSFML%\build\ifort_64_production
%CRYSFML%\build\ifort_64_debug08
%CRYSFML%\build\ifort_64_production08
%CRYSFML%\build\ifort_32_production
%CRYSFML%\build\gfortran_debug
%CRYSFML%\build\gfortran_production
Linux: $CRYSFML/build/ifort_64_debug
$CRYSFML/build/ifort_64_production
$CRYSFML/build/ifort_64_debug08
$CRYSFML/build/ifort_64_production08
$CRYSFML/build/ifort_32_production
$CRYSFML/build/gfortran_debug
$CRYSFML/build/gfortran_production
- Go to the appropriate subdirectory of the build directory and execute a command of the type:
cmake -G "NMake Makefiles" -D CMAKE_Fortran_COMPILER=ifort -D GUI=ON ..\..\.
^ ^ ^ ^
Generator of OS dependent Specify compiler Kind of library root CrysFML directory
makefiles
The Cmake scripts are already in the CrysFML directory and in CrysFML\cmake (or CrysFML/cmake)
By default:
compiler: CMAKE_Fortran_COMPILER=ifort
GUI=OFF
CMAKE_BUILD_TYPE=Release
Other options should be provided explicitly
========
Windows:
========
Building CrysFML
================
Within %CRYSFML%\build\ifort_64_debug, execute the command:
Prompt> cmake -G "NMake Makefiles" -D CMAKE_Fortran_COMPILER=ifort -D GUI=ON -D ARCH32=OFF -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=%CRYSFML%\ifort64_debug -D CRYSFML_PREFIX=LibC -D WCRYSFML_PREFIX=LibW ..\..\.
If everything is OK, you have created the appropriate makefiles for building CrysFML in console mode and with Winteracter.
For effectively compile and build the library, within the same directory execute the command:
Prompt> nmake install
The libraries (LibC and LibW) will be installed in %CRYSFML%\ifort64_debug
Thats all!
For release mode (production) yo do similarly:
Within %CRYSFML%\build\ifort_64_production, execute the commands:
Prompt> cmake -G "NMake Makefiles" -D CMAKE_Fortran_COMPILER=ifort -D GUI=ON -D ARCH32=OFF -D CMAKE_INSTALL_PREFIX=%CRYSFML%\ifort64 -D CRYSFML_PREFIX=LibC -D WCRYSFML_PREFIX=LibW ..\..\.
Prompt> nmake install
The libraries (LibC and LibW) will be installed in %CRYSFML%\ifort64
For gfortran within MinGW64, the generator of makefiles is "MinGW Makefiles", as an example in debug mode the commands
to be executed within %CRYSFML%\build\gfortran_debug are:
Prompt> cmake -G "MinGW Makefiles" -D CMAKE_Fortran_COMPILER=gfortran -D GUI=OFF -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=%CRYSFML%\gfortran_debug -D CRYSFML_PREFIX=LibC ..\..\.
Prompt> mingw32-make install
The library (LibC) will be installed in %CRYSFML%\gfortran_debug
Building CrysFML08
==================
# For the moment only console mode is available
Debug:
Prompt> cmake -G "NMake Makefiles" -D ARCH32=OFF -D CMAKE_BUILD_TYPE=Debug -D CMAKE_Fortran_COMPILER=ifort -D CMAKE_INSTALL_PREFIX=%CRYSFML%\ifort64_debug -D CRYSFML_PREFIX=LibC08 -D CRYSFML08=ON ..\..\.
Prompt> nmake install
The library (LibC08) will be installed in %CRYSFML%\ifort64_debug
Release:
Prompt> cmake -G "NMake Makefiles" -D ARCH32=OFF -D CMAKE_BUILD_TYPE=Release -D CMAKE_Fortran_COMPILER=ifort -D CMAKE_INSTALL_PREFIX=%CRYSFML%\ifort64 -D CRYSFML_PREFIX=LibC08 -D CRYSFML08=ON ..\..\.
Prompt> nmake install
The library (LibC08) will be installed in %CRYSFML%\ifort64
======
Linux:
======
The commands are identical except for "/" instead of "\" and the generators of makefiles is "Unix makefiles"
Examples for working only with console programs:
Prompt> cmake -G "Unix Makefiles" -D CMAKE_Fortran_COMPILER=ifort -D GUI=OFF -D ARCH32=OFF -D CMAKE_INSTALL_PREFIX=$CRYSFML/ifort64 -D CRYSFML_PREFIX=LibC -D WCRYSFML_PREFIX=LibW ../../.
or with gfortran:
Prompt> cmake -G "Unix Makefiles" -D CMAKE_Fortran_COMPILER=gfortran -D GUI=OFF -D ARCH32=OFF -D CMAKE_INSTALL_PREFIX=$CRYSFML/GFortran -D CRYSFML_PREFIX=LibC ../../.
Build the library using:
Prompt> make install
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment