File: README.md

package info (click to toggle)
spglib 2.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 14,180 kB
  • sloc: ansic: 125,066; python: 7,717; cpp: 2,197; f90: 2,143; ruby: 792; makefile: 22; sh: 18
file content (26 lines) | stat: -rw-r--r-- 660 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Fortran example

This is an example of how to use Spglib through the Fortran api

## Examples of using spglib in a cmake project

See the local [`CMakeLists.txt`](CMakeLists.txt) file for how to use
spglib in a cmake project, using either native cmake options or pkg-config.

## Examples of linking to spglib manually

To manually compile `example.F90`:

```console
gfortran example.F90 -I[include directory] -L[library directory] -lsymspg
```

where `[include directory]` and `[library directory]` are taken from `pkg-config --cflags --libs spglib_f08`.

## Running the example

```console
$ cmake -B ./build
$ cmake --build ./build
$ ./build/example_f
```