5

I am wondering if there is an open source scientific library for chemistry and/or physics for C++ (or maybe C)?

I am NOT looking for simulation models, visualization, 3-d modeling.

I am just looking for a basic toolbox that would have, for example: various constants such as Ideal Gas Constant, Avogadro constant, periodic table of the elements values; molecular weight calculation; maybe basic functions implementing equations for stoichiometry, gas laws, thermal dynamics, kinetics.

Chemistry/Physics 101 kind of stuff.

I have found on SourceForge:

  • Christoph Steinbeck's The Chemical Development Kit (Java) on SourceForge.
  • NIST-const
Roger Nelson
  • 1,882
  • 2
  • 15
  • 21

5 Answers5

6

I would take a look at the GNU Scientific Library:

http://www.gnu.org/software/gsl/

It should have most of the physical constants you're looking for. As far as the chemistry related stuff, I don't know of any basic packages that do all of those calculations right out of the box.

Update: I forgot about another project that would have all of the periodic table stuff (and probably more):

http://openbabel.org

specifically check out:

http://openbabel.org/api/2.2.0/classOpenBabel_1_1OBElementTable.shtml#_details

JoshAdel
  • 66,734
  • 27
  • 141
  • 140
2

Since you excluded simulations, PyQuante probably isn't what you're looking for, but you might find kinpy and thermopy interesting.

Klaus-Dieter Warzecha
  • 2,265
  • 2
  • 27
  • 33
1

I really like this book for it:

http://www.amazon.com/Physics-Game-Programmers-Grant-Palmer/dp/159059472X

I has the physics formulas in there and the source code is available online:

http://apress.com/book/view/159059472X

I haven't seen much in the way of chemistry. Physics is more popular because it has direct affect on gaming, of course. :-)

Update: a few on chemistry:

eruciform
  • 7,680
  • 1
  • 35
  • 47
1

Kalzium, part of the KDE tools. Periodic table plus (based on the screenshots) an equation solver and more.

Andrew Dalke
  • 14,889
  • 4
  • 39
  • 54
1

In High Energy Physics, two common c++ libraries/frameworks are CLHEP and ROOT. Both of these contain units and physical constants - see e.g. CLHEP Units. CLHEP also contains a lot of libraries for linear algebra, while ROOT has a lot of tools for data analysis.

Probably not entirely what you are looking for, but may be useful to someone

Nick Edwards
  • 630
  • 8
  • 18