C++ Chemistry Library: Find the Solution

  • Context: C/C++ 
  • Thread starter Thread starter gedaiu
  • Start date Start date
  • Tags Tags
    C++ Chemistry
Click For Summary

Discussion Overview

The discussion centers around the search for a C++ library capable of calculating chemical reactions, addressing both the feasibility of such a library and the complexities involved in modeling chemical interactions. Participants explore the challenges of creating a comprehensive solution for chemistry in programming.

Discussion Character

  • Exploratory
  • Debate/contested
  • Technical explanation

Main Points Raised

  • One participant inquires about the existence of a C++ class for calculating chemical reactions, expressing a lack of resources found online.
  • Another participant asserts that a comprehensive C++ class for all chemical reactions does not exist, implying the complexity of the task.
  • A participant questions the difficulty of creating such algorithms, recalling simpler rules from school chemistry.
  • Suggestions are made to explore chemical reaction databases and existing software like Cantera and Chemkin, though their applicability as libraries is questioned.
  • A chemist-programmer participant acknowledges the complexity of chemical reactions and suggests that defining rules for a specific subset of reactions may be more feasible.
  • One participant mentions the need for predefined reactions and considers implementing an algebraic structure for their project.
  • A later reply emphasizes the extensive time and expertise required to analyze even a single chemical reaction, suggesting that a general solution may not be achievable in the near future.

Areas of Agreement / Disagreement

Participants generally agree on the complexity of modeling chemical reactions and the challenges in finding a suitable C++ library. However, there are differing views on the feasibility of creating a useful subset of rules or classes for specific applications.

Contextual Notes

Limitations include the lack of consensus on the feasibility of a comprehensive library and the varying levels of complexity in chemical reactions that may not be easily modeled.

gedaiu
Messages
4
Reaction score
0
Hi,

Does anybody know about some C++ class which can calculate chemistry formulas?

I mean if i have two variables A and B which are some substances then the variable C = A + B, C will be the result of the two substances. I need a class like this for a personal project and i didn't found anything on the internet. I found on sourceforge.net a similar project but is in written java.

I am a programmer and i have only basic knowledge about chemistry and also this is my first post here...


Thank you!
 
Technology news on Phys.org
Basically you are asking whether there exists a C++ class that combines everything chemists have been working on for the last several hundred years.

Answer is: no.
 
why?

It's a hard algorithm to make this? As i remember from the school the anorganic has a simple algorithm.
 
Perhaps I don't what you are asking about then. Give examples af A & B.

You may also read about chemical reaction databases to get what the problem is about.
 
Try canetra or chemkin?
 
hi,

I searched something about canetra and chemkin but it's seems those are stand-alone programs. I need a library for C++(programming language) which is capable to calculate reactions(any reactions).

Today I had a conversation with a friend, she is a chemist. She told me that it is a little bit hard to calculate how two substances react because there are exceptions and every day people find new reactions.

I need this library to make a project based on some http://en.wikipedia.org/wiki/Evolutionary_algorithm" . Maybe i am to elated about it. I thought there are some algorithms for this because if you need a library for phisics or advanced math you can find a lot of them. It seems chemists are not good friends with programmers :P

Thank you
 
Last edited by a moderator:
gedaiu said:
It seems chemists are not good friends with programmers

Really? How come you have a chemist friend?

All it means is thar chemical reality is pretty complicated. Even advanced physical libraries are not about all physics - they deal with some small, well defined subsets of physics. In chemistry even defining small subsets is often difficult.
 
gedaiu said:
hi,

I searched something about canetra and chemkin but it's seems those are stand-alone programs. I need a library for C++(programming language) which is capable to calculate reactions(any reactions).

Today I had a conversation with a friend, she is a chemist. She told me that it is a little bit hard to calculate how two substances react because there are exceptions and every day people find new reactions.

I need this library to make a project based on some http://en.wikipedia.org/wiki/Evolutionary_algorithm" . Maybe i am to elated about it. I thought there are some algorithms for this because if you need a library for phisics or advanced math you can find a lot of them. It seems chemists are not good friends with programmers :P

Thank you

Turns out I am a chemist who is also a programmer, AND I happen to be familiar with C++. In general, what you have been told by others on this thread is correct ... you cannot write a general set of rules to predict ALL possible chemical reactions under all conditions, which is what you seem to be asking for.

However, all may not be lost. Can you describe a little more about the specific application you are trying to develop, perhaps in pseudocode? I might be able to help you define at least a test set of rules and classes to use for a particular subset of reactions. If that works, you might decide it is worth extending to other systems.
 
Last edited by a moderator:
Thank you all for your help. It's all clear for me now. I decided to use a list of predefined reactions and implement a group(algebraic structure) with it or something like this.

@SpectraCat if you are interested about the project i can give you details on PM
 
  • #10
you need to realize that at the current point in time, even analyzing a single chemical reaction can require several months of straight work by an experienced computational chemistry expert, and several thousand hours of CPU time, using different programs packages with several million lines of code each.

What you are asking for is, in general, not possible currently and will likely not be possible in the forseeable future (unless I'm seriously misunderstanding what you are trying to do. You're making it easy to get misunderstood.)
 

Similar threads

  • · Replies 22 ·
Replies
22
Views
3K
  • · Replies 29 ·
Replies
29
Views
8K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 23 ·
Replies
23
Views
3K
Replies
4
Views
3K
Replies
3
Views
4K
Replies
2
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K