How to write a program that will provide me all possible products of a chemical reaction?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Maggie
el 11 de En. de 2017
Comentada: Walter Roberson
el 11 de En. de 2017
Hello,
I need to write a program that will generate possible products from a defined starting material.
The problem is more complex, but let’s start with the following:
If there is this structure component in a molecule:
R1-CH=CH-CH2-CH=CH-R2
it will always get oxidized to the peroxide:
R1-CH=CH-CH(OOH)-CH=CH-R2
No matter what R1 and R2 are.
So from CH3-CH=CH-CH2-CH=CH-CH3 I want to get CH3-CH=CH-CH(OOH)-CH=CH-CH3, but I want to be able to provide any starting material and get a proper product.
Thank you!
2 comentarios
Stephen23
el 11 de En. de 2017
A universal solution to this is would be incredibly complex. People employ huge supercomputers to try and predict what molecules do:
"The best material model of a cat is another, or preferably the same, cat" Norbert Wiener
Respuesta aceptada
Walter Roberson
el 11 de En. de 2017
It appears to me that you have enough carbon and hydrogen and oxygen there that among the possible outcomes, given multiple input molecules, are the plastics. They might not be favored in most conditions, but you asked for possible rather than likely. Plastics can grow indefinitely. Therefore you could only potentially list all of the possible outcomes if you restricted the number of input molecules, and the solution would involve all of the possible arrangement of atoms that satisfied bonding criteria together with whatever maximum charge you were willing to accept.
With the hydrogen and oxygen there, water molecules is one outcome. Remember to allow for all of the arrangements of water molecules polar covalently bound, because in a sense each arrangement is a different substance.
1 comentario
Walter Roberson
el 11 de En. de 2017
If you have transformation rules, that This arrangement is allowed to produce This and That products, then whether a particular output can be produced from the inputs is something that can be examined in terms of a topic known in computing ad Formal Grammers (a topic very closely related to Parsing). This is the same category as the study of analyzing sentences in terms of "adjective phrase" and "comma apposition" and so on: given a set of rules, and an input, can you recognize the input through the rules, which might require rewriting in other forms according to the rules?
Once a complete set of analysis and transformation rules is built up, the analysis system can be "run in reverse" to "generate" all of the possible valid "sentences".
For you, this would mean that if you had the transformation rules and a description of the inputs (some states cannot be reached with small numbers of input molecules) then you could generate all of the possible products.
It can help in such a system to have a well defined ordering of components so that you do not get lost in endless permutations of the possibilities, but that is not necessarily strictly required.
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!