Skip to content

ibressler/libcfp

Repository files navigation

libcfp: Library for Chemical Formula Parsing

It analyses the ASCII representation of a chemical formula. For every element it extracts the following characteristics:

  • symbol name (first letter in upper case, all following letters in lower case)
  • nucleon number (is isotope or not, optional, integer number)
  • coefficient (optional, floating point number unequal 1.0)

It is written in C++, analyses syntax only and does not know anyhing about semantics (physical characteristics). It is intended to be independent of additional external libraries at build or runtime (namespace ::std:: only).

On github: https://github.com/ibressler/libcfp

Documentation

How to build

CMake is used for building the library on various platforms. Just run cmake to get a list of available generators (which generate build environment specific project files). On a common Linux system it should be like that:

cd <libcfp-directory>
mkdir build
cd build
cmake ..
make

Afterwards, the libraries (dynamic and static) can be found in lib/

For advanced build settings (debug symbols, optimization, warnings, etc ...), adjust CMakeLists.txt to your needs.

In a MSYS shell on a Windows combined with MinGW, you may have to specify a Makefile generator:

cmake .. -G "MSYS Makefiles"

The selects the cmake generator for Makefiles used in a MSYS shell.

Copyright

This library is released under the GNU Lesser General Public License (LGPL). For further information see LICENSE

Copyright (c) 2010-2011 Ingo Bressler (libcfp at ingobressler.net)

It was started by Ingo Bressler (libcfp at ingobressler.net) at the Stranski-Laboratory for Physical and Theoretical Chemistry of the Technische Universität Berlin in 2009.

About

A Library for Chemical Formula Parsing. Syntax only, no semantics. No external library dependencies, namespace std:: only. Uses UnitTest++ for consistency.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages