| | |
Mass to Formula
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Apr 2006
Posts: 4
Reputation:
Solved Threads: 0
I am trying to work out this issue in a molecular caluclator that I am trying to develop. I would like to go from mass to formula.
So I am given a mass, ie 120.3433. And an equation could have up to 8 C, 3 H, 11 N, 6 S but they have to reasonable close to 120.3433. Just letting a person get a reasonable idea of what a formula could be if they were only given a mass. How do I get the different combinations?
for instance, C8H3N4S6, C7H3N4S6, C6H3N4S6, or something like that. Any help you could offer would be greatly appreciated.
If there is some clarification that you need, please let me know...
So I am given a mass, ie 120.3433. And an equation could have up to 8 C, 3 H, 11 N, 6 S but they have to reasonable close to 120.3433. Just letting a person get a reasonable idea of what a formula could be if they were only given a mass. How do I get the different combinations?
for instance, C8H3N4S6, C7H3N4S6, C6H3N4S6, or something like that. Any help you could offer would be greatly appreciated.
If there is some clarification that you need, please let me know...
You must also take into account the valence bond of the different elements !
For example : a you can write a simple formule like CH2 but this can never exist as an molecule on it's own. A carbon atom has 4 "hooks" so CH4 can exist as a molecule. CH2 cannot. When the number of atoms increase so will their combinations most of wich cannot be a real molecule.
For example : a you can write a simple formule like CH2 but this can never exist as an molecule on it's own. A carbon atom has 4 "hooks" so CH4 can exist as a molecule. CH2 cannot. When the number of atoms increase so will their combinations most of wich cannot be a real molecule.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Make love, no war. Cave ab homine unius libri.
Danny
Don't think this idea'll fly. As mentioned, the number of permutations will be staggering, especially if all elements (below or equal to the molecular/formula mass) can be valid. Even organic molecules could be metallo-organic, so it doesn't help v. much unless you specify the constituent elements of the compound.
Also, I assume you're referring to Mr/Fr rather than mass in grams??!
The fact that C can form triple, double bonds as well as multiple aromatic rings (heterogeneous/homogeneous) as well as alicylic rings, will just confuse matters. I don't think you'll find an algorithm to weed out the possible and impossible answers.
Also, I assume you're referring to Mr/Fr rather than mass in grams??!
The fact that C can form triple, double bonds as well as multiple aromatic rings (heterogeneous/homogeneous) as well as alicylic rings, will just confuse matters. I don't think you'll find an algorithm to weed out the possible and impossible answers.
Last edited by ardav; Jan 22nd, 2009 at 2:24 pm.
![]() |
Similar Threads
- Function 'initgraph' should have a prototype (C++)
- LNK2001 and LNK2019 problem! (C++)
- Help with automatic update problem and more (Viruses, Spyware and other Nasties)
- Help with simple programming... (Python)
- bmiCalculator...check my code (C++)
- relation of mathematics with computer science (Computer Science)
- HELP! Illegal Character Constant in a Console Application (C++)
- Satellite signals to and from earth (Computer Science)
Other Threads in the Java Forum
- Previous Thread: HELP!! jv progrm to simulate bursary unit
- Next Thread: Output error on invalid data, Scanner
Views: 431 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for Java
911 addball addressbook android api append apple applet application arguments array arrays automation binary bluetooth button chat class classes client code component css csv database draw eclipse ee error event exception file fractal game givemetehcodez graphics gui helpwithhomework html ide image input integer j2me java javaarraylist javaprojects jmf jni jpanel julia jvm key linux list loan loop map method methods mobile netbeans newbie number object oracle oriented output phone print problem program programming project recursion reporting robot scanner screen se server service set size sms socket software sort sql stream string swing test threads time transfer tree ubuntu windows wrong






