Fortnet is a Behler-Parrinello-Neural-Network implementation, written in modern Fortran. Using atom-centered symmetry functions to characterize local atomic environments, Fortnet provides easy access to the famous BPNN neural network architecture to predict atomic or global properties of your physical system, featuring powerful but optional MPI parallelism.
Note: This section describes the building with default settings in a typical Linux environment. For more detailed information on the build customization and the build process, consult the detailed building instructions in INSTALL.rst.
Download the latest stable source code from GitHub:
git clone https://github.com/vanderhe/fortnet.git
You need CMake (>= 3.16) to build and h5py to test Fortnet. If your environment
offers no CMake/h5py or only older versions, you can easily install the latest
software via Python's pip
command:
pip install cmake h5py
Start CMake by passing your compilers environment variables FC
, CC
and
the location where the code should be installed and the build directory
(_build
) as options:
FC=mpifort CC=gcc cmake -DCMAKE_INSTALL_PREFIX=$HOME/opt/fnet -B _build .
If the configuration was successful, start the build with:
cmake --build _build -- -j
After successful build, you should test the code by running:
pushd _build ctest -j popd
If the tests were successful, install the package via:
cmake --install _build
For further details see the detailed building instructions.
An alternative way of obtaining Fortnet is to install it via the conda package
management framework using Miniconda or Anaconda. Make sure to add/enable the
conda-forge
channel in order to be able to access Fortnet:
conda config --add channels conda-forge
We recommend to set up a dedicated conda environment and to use the mamba installer:
conda create --name fortnet conda activate fortnet conda install mamba
There are several build variants available, choose the one suiting your needs. For example, by issuing
mamba install 'fortnet=*=nompi_*'
or
mamba install 'fortnet=*=mpi_mpich_*'
or
mamba install 'fortnet=*=mpi_openmpi_*'
to get the last stable release of Fortnet with, respectively, serial build or with MPI-parallelized build using either the MPICH or the OpenMPI framework.
Depending on whether you decided for a serial or parallel version, you may issue
fnet
or
mpirun -np ${NPROCS} fnet
to start Fortnet. ${NPROCS} is to be substituted by the number of MPI tasks (in general number of CPU cores) available.
Consult following resources for documentation:
When publishing results obtained with Fortnet, please cite the following article:
New features, bug fixes, documentation, tutorial examples and code testing is welcome during the ongoing Fortnet development!
The project is hosted on github. Please check CONTRIBUTING.rst for guide lines.
I am looking forward to your pull request!
Fortnet is released under the GNU Lesser General Public License. See the included LICENSE file for the detailed licensing conditions.