Sciencemadness Discussion Board » Fundamentals » Chemistry in General » Two FREE tools you probably didn't even know you had! Select A Forum Fundamentals   » Chemistry in General   » Organic Chemistry   » Reagents and Apparatus Acquisition   » Beginnings   » Responsible Practices   » Miscellaneous   » The Wiki Special topics   » Technochemistry   » Energetic Materials   » Biochemistry   » Radiochemistry   » Computational Models and Techniques   » Prepublication Non-chemistry   » Forum Matters   » Legal and Societal Issues   » Detritus   » Test Forum

Pages:  1  2
Author: Subject: Two FREE tools you probably didn't even know you had!
Diachrynic
Hazard to Others

Posts: 132
Registered: 23-9-2017
Location: Germany
Member Is Offline

Mood: zenosyne

Make chemistry equations look different with Unicode

I made a small program (23 KB) to make chemical equations somewhat look better.

It turns this:

2MnO4 - + SO3 2- + 2OH- --> 2MnO4 2- + SO4 2- + H2O

into this:

2MnO₄⁻ + SO₃²⁻ + 2OH⁻ → 2MnO₄²⁻ + SO₄²⁻ + H₂O

by using a bunch of RegEx and Unicode. (Had to increase size a bit 'cause it was kind of small.)

If anyone wants to try it out, here is a download link: http://www.mediafire.com/file/aesa60r6c2w4e41/ChemistryInlin... (Just in case if the upload here does not work.)

If anyone wants to extend it, here is the important part of the source code (language is VB):

 Code:  Private Sub Convert() Dim Str1 As String = TextBox1.Text Str1 = " " + Str1.TrimEnd(" ") Str1 = Regex.Replace(Str1, "[<]+[-‒–—―=]*[>]+", "↔") Str1 = Regex.Replace(Str1, "[-‒–—―=]*[>]+", "→") Str1 = Regex.Replace(Str1, "(?

To anyone better in programming this probably looks horrible

Have fun!

Cheers

Attachment: ChemistryInlineFormula.exe (23kB)

we apologize for the inconvenience
VSEPR_VOID
International Hazard

Posts: 719
Registered: 1-9-2017
Member Is Offline

Mood: Fullerenes

$$2 \ \text{C}_6\text{H}_{12}\text{O}_6$$
test

[Edited on 17-5-2018 by VSEPR_VOID]

MJ101
Hazard to Self

Posts: 82
Registered: 14-6-2018
Member Is Offline

Mood: Always Sunny

Hi,
I found this, which may also be of some use.

https://chemapps.stolaf.edu/jmol/jmol.php

I hope it's of some use to everyone.

https://chemapps.stolaf.edu/jmol/jmol.php?model=2595-97-3&am...
fusso
International Hazard

Posts: 1807
Registered: 23-6-2017
Location: 4D universe
Member Is Offline

Mood:

Quote: Originally posted by j_sum1
 Quote: Originally posted by chemrox chemsketch requires registration and the word "mandatory" is anathema to moi. It just seems to me that limit notation is part of the history and theory and is itself limited as has been mentioned. I guess I'm prejudiced because I use mostly partials. And rarely do physics. But I have explained calculus using the concept of limits and have reminded myself how it all works by writing out the ideas with limit notation.

A bit nonsequential, chemrox. It seems like you are answering several threads at once.

I downloaded and use chemsketch. No registration was required. This might be a recent change. Avogadro is similar but not as powerful.

Limit notation in calculus, or more accurately, analysis -- seems an ok way to write the concept. Or, more to the point, if you understand the concept, the notation is pretty efficient. Beginning with the notation and then trying to insert the concept is a way to introduce confusions, but that is a pedagogical issue and not unique to limits at all.

Liebniz notation does have advantages over function notation but I think I sumarised the position in the other thread.
The registration screen do occur to me

j_sum1
10-10-2018 at 00:07
j_sum1
10-10-2018 at 03:52
j_sum1
21-12-2018 at 21:04
j_sum1
30-12-2018 at 03:25
j_sum1
12-1-2019 at 15:04
Diachrynic
Hazard to Others

Posts: 132
Registered: 23-9-2017
Location: Germany
Member Is Offline

Mood: zenosyne

Following up on my post from - what the shit pretty much exactly three years ago?! - I have improved the program into something far more practical.

Which one of these two looks better you'd say:

Cr2O7 2- + 2 OH- -> 2 CrO4 2- + H2O

Cr2O72- + 2 OH- → 2 CrO42- + H2O

Using the internal sub- and superscript button is a bit painful tho, especially because you get a dialogue box every time. I wrote an autohotkey script that converts the top line to the bottom line with one key press.

Here is the code:

 Code: #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. ^j:: temp = %clipboard% SendInput, {Ctrl down}c{Ctrl up} Sleep 10 Str1 = %clipboard% Str1 := " " + RTrim(Str1, " ") Str1 := RegExReplace(Str1, "[<]+[-‒–—―=]*[>]+", "↔") Str1 := RegExReplace(Str1, "[-‒–—―=]*[>]+", "→") Str1 := RegExReplace(Str1, "(?

nota bene: In the code I use the function Sleep 10 which was needed to slow down a bit, otherwise it would paste before it overwrote the old clipboard. You might not need this, but it adds only 20 ms delay overall so I think it is acceptable.

If you have AHK already installed you just need to save this code as .ahk and run it. Currently the keybind is set to CTRL+J as denoted by the ^j:: in the beginning, but you can change this to whatever you want. See this part of the AHK documentation for how other keys are encoded.

To use it, run the script, write an equation, select it, then hit the keybind associated with it. It will store your current clipboard, replace the equation with the sub- and supercripted one and then restore your clipboard.

Hopefully this will be useful for some people!

we apologize for the inconvenience
Pages:  1  2

 Sciencemadness Discussion Board » Fundamentals » Chemistry in General » Two FREE tools you probably didn't even know you had! Select A Forum Fundamentals   » Chemistry in General   » Organic Chemistry   » Reagents and Apparatus Acquisition   » Beginnings   » Responsible Practices   » Miscellaneous   » The Wiki Special topics   » Technochemistry   » Energetic Materials   » Biochemistry   » Radiochemistry   » Computational Models and Techniques   » Prepublication Non-chemistry   » Forum Matters   » Legal and Societal Issues   » Detritus   » Test Forum