C/C++ C++ Chemistry Library: Find the Solution

  • Thread starter Thread starter gedaiu
  • Start date Start date
  • Tags Tags
    C++ Chemistry
AI Thread Summary
The discussion centers around the difficulty of finding a C++ library that can calculate chemical reactions. The original poster seeks a class that can combine substances A and B into a resultant C, but participants clarify that creating a universal algorithm for all chemical reactions is highly complex due to the intricacies of chemistry. They suggest that while some databases and programs exist, they are often stand-alone and not libraries. A chemist-programmer in the thread emphasizes that predicting all chemical reactions is not feasible and proposes focusing on a specific application with predefined reactions. The conversation highlights the challenges of integrating chemistry with programming, suggesting that current capabilities in computational chemistry require extensive expertise and resources.
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.)
 
Back
Top