mirror of
https://github.com/TREX-CoE/trexio.git
synced 2024-08-25 14:41:44 +02:00
Merge branch 'master' of github.com:TREX-CoE/trexio
This commit is contained in:
commit
b852a060d1
18
README.md
18
README.md
@ -46,6 +46,22 @@ TREX library for efficient I/O.
|
||||
7. `sudo make install`
|
||||
|
||||
|
||||
## Linking to your program
|
||||
|
||||
The `make install` command takes care of installing the TREXIO shared library on the user machine.
|
||||
Once installed, add `-ltrexio` to the list of compiler options.
|
||||
In some cases (e.g. when using custom `prefix` during configuration), the TREXIO library might end up installed in a directory, which is absent in the default `$LIBRARY_PATH`.
|
||||
In order to link the program against TREXIO, the search paths in the current shell can be modified as follows: `export LIBRARY_PATH=$LIBRARY_PATH:<path_to_trexio>/lib` (same holds for `$LD_LIBRARY_PATH`). Do not forget to change `<path_to_trexio>`.
|
||||
If your compilation relies on some build tools (like Autotools or CMake), feel free to use the built-in functions to locate and link external dependencies automatically.
|
||||
|
||||
In Fortran applications, make sure that the `trexio_f.f90` module file is included in the source tree.
|
||||
You might have to manually copy it into your program source directory.
|
||||
The `trexio_f.f90` module file can be found in the `include/` directory of the TREXIO source code distribution.
|
||||
|
||||
**Note:** there is no need to include `trexio.h` header file during compilation of Fortran programs.
|
||||
Only the installed library and the Fortran module file are required.
|
||||
|
||||
|
||||
## Naming convention
|
||||
|
||||
The primary TREXIO API is composed of the following functions:
|
||||
@ -81,7 +97,7 @@ For example, the tutorial covering TREXIO basics using benzene molecule as an ex
|
||||
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/TREX-CoE/trexio-tutorials/HEAD?filepath=notebooks%2Ftutorial_benzene.ipynb)
|
||||
|
||||
|
||||
## Technical documentation
|
||||
## Documentation
|
||||
|
||||
[Documentation generated from TREXIO org-mode files.](https://trex-coe.github.io/trexio/)
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ([2.69])
|
||||
AC_INIT([trexio], [1.0.0], [https://github.com/TREX-CoE/trexio/issues])
|
||||
AC_INIT([trexio], [1.1.0], [https://github.com/TREX-CoE/trexio/issues])
|
||||
AM_INIT_AUTOMAKE([subdir-objects color-tests parallel-tests silent-rules 1.11])
|
||||
AM_MAINTAINER_MODE()
|
||||
LT_PREREQ([2.2])
|
||||
|
@ -11,8 +11,7 @@ can be used to convert data from one input/output file format into another.
|
||||
## Requirements
|
||||
|
||||
- python3 (>= 3.6)
|
||||
- numpy
|
||||
- C compiler (gcc/icc)
|
||||
- numpy (>= 1.17.3)
|
||||
|
||||
|
||||
## Installation from PyPI
|
||||
@ -31,6 +30,7 @@ For more details, see the corresponding part of the [Python documentation](https
|
||||
|
||||
## Additional requirements (for installation from source)
|
||||
|
||||
- C compiler (gcc/icc)
|
||||
- HDF5 library (>= 1.8)
|
||||
- pkgconfig (Python package)
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
# prefixes
|
||||
cat prefix_front.c > trexio.c
|
||||
cat prefix_front.h > trexio.h
|
||||
|
||||
# grep some usefull constants from the config.h
|
||||
echo "" >> trexio.h
|
||||
grep "TREXIO_PACKAGE_VERSION" ../../include/config.h >> trexio.h
|
||||
@ -11,10 +12,24 @@ grep "TREXIO_VERSION_MINOR" ../../include/config.h >> trexio.h
|
||||
grep "TREXIO_VERSION_PATCH" ../../include/config.h >> trexio.h
|
||||
echo "" >> trexio.h
|
||||
|
||||
# parse the config-defined version attributes to pass them to Fortran module file
|
||||
VERSION_VAL=`grep "TREXIO_PACKAGE_VERSION" ../../include/config.h | cut -d " " -f 3`
|
||||
VERSION_MAJOR_VAL=`grep "TREXIO_VERSION_MAJOR" ../../include/config.h | cut -d " " -f 3`
|
||||
VERSION_MINOR_VAL=`grep "TREXIO_VERSION_MINOR" ../../include/config.h | cut -d " " -f 3`
|
||||
VERSION_PATCH_VAL=`grep "TREXIO_VERSION_PATCH" ../../include/config.h | cut -d " " -f 3`
|
||||
|
||||
cat prefix_s_front.h > trexio_s.h
|
||||
cat prefix_fortran.f90 > trexio_f.f90
|
||||
cat prefix_python.py > trexio.py
|
||||
|
||||
# append version string and attributes to the Fortran module file
|
||||
echo "" >> trexio_f.f90
|
||||
echo "character(len = 12) :: TREXIO_PACKAGE_VERSION = ${VERSION_VAL}" >> trexio_f.f90
|
||||
echo "integer(4) :: TREXIO_VERSION_MAJOR = ${VERSION_MAJOR_VAL}" >> trexio_f.f90
|
||||
echo "integer(4) :: TREXIO_VERSION_MINOR = ${VERSION_MINOR_VAL}" >> trexio_f.f90
|
||||
echo "integer(4) :: TREXIO_VERSION_PATCH = ${VERSION_PATCH_VAL}" >> trexio_f.f90
|
||||
echo "" >> trexio_f.f90
|
||||
|
||||
# c front end
|
||||
cat populated/pop_*.c >> trexio.c
|
||||
cat populated/pop_*.h >> trexio.h
|
||||
|
@ -2,6 +2,12 @@ program test_trexio
|
||||
use trexio
|
||||
implicit none
|
||||
|
||||
print * , "============================================"
|
||||
print'(a,a)' , " TREXIO VERSION STRING : ", TREXIO_PACKAGE_VERSION
|
||||
print'(a,i3)', " TREXIO MAJOR VERSION : ", TREXIO_VERSION_MAJOR
|
||||
print'(a,i3)', " TREXIO MINOR VERSION : ", TREXIO_VERSION_MINOR
|
||||
print * , "============================================"
|
||||
|
||||
call system('rm -rf test_write_f.dir')
|
||||
print *, 'call test_write(''test_write_f.dir'', TREXIO_TEXT)'
|
||||
call test_write('test_write_f.dir', TREXIO_TEXT)
|
||||
|
Loading…
Reference in New Issue
Block a user