For programming questions that involve chemistry - such as questions about programmatically working with chemical formulae, simulating chemical processes, or using chemistry-related libraries and APIs. Non-programming questions about chemistry are off-topic here, but may be on-topic on chemistry.stackexchange.com.
Questions tagged [chemistry]
275 questions
1
vote
1 answer
Units of JMol XYZ
XYZ files specify atoms and their cartesian coordinates.
Example XYZ file:
[Number of atoms]
Comment
[Chemical symbol] [X] [Y] [Z]
I was wondering what the units used were in JMol (i.e., Angstroms or Bohr radii)

mailmindlin
- 616
- 2
- 7
- 25
1
vote
3 answers
NetLogo- how to put balanced chemical equations into a model?
I was wondering if it was possible to put balanced chemical equations into a model - and if so, how to include state symbols in an existing NetLogo model. I have not seen any examples in the models library so was not sure if it was possible.
I…

user286190
- 41
- 3
1
vote
1 answer
Turtle that has no effect on other turtles implementation but speeds up the reaction
I am using an existing model in netlogo called Chemical Equilibrium and am adding some more code. I want to add turtles (catalyst) which have no effect on the reaction/other turtles but speeds up the FORWARD reaction, which has been defined as…

user286190
- 41
- 3
1
vote
3 answers
replacing text in a chemical formula string
I'm having trouble writing a function that will take a chemical formula string such as "NiNFe(AsO2)2" and remove one of the elements.
my current attempt is:
pattern = new RegExp(symbol, "g")
formula.replace(pattern, "")
If the symbol is "N" and…

gaplus
- 279
- 4
- 15
1
vote
1 answer
Molecular weight calculator in Lua
As my first real program in Lua, I'd like to create a molecular weight calculator (similar to the one here: http://www.lenntech.com/calculators/molecular/molecular-weight-calculator.htm )
I'd like some help with the first step of this program. My…

Far Zin
- 121
- 4
1
vote
0 answers
Trouble with the steepest descent algorithm
I am trying to write a program that minimizes the total energy of a 2-dimensional, 400 atom system using the steepest descent algorithm. The general idea of my program is the following:
Get the atomic coordinates (x, y)
Randomly choose an…

user3164457
- 13
- 2
1
vote
1 answer
Using VBA macro in Excel to retrieve images of chemical structures from the NCI Chemical Identifier Resolver
Based on the code given at this site (see below) I would like to adapt some VBA Excel macros to convert chemical names to chemical structures in Excel using the NCI Chemical Identifier Resolver at http://cactus.nci.nih.gov/chemical/structure
In…

Tom Wenseleers
- 7,535
- 7
- 63
- 103
1
vote
1 answer
Importing data associated with a given CAS number from the NIST webbook web site into R
I would like to retrieve information associated with a given CAS registry number (Chemical Abstracts Service nr) from the NIST webbook web site in R, using the provided API.
E.g. for cas nr. "19431-79-9" (Caryophylladienol II),…

Tom Wenseleers
- 7,535
- 7
- 63
- 103
1
vote
1 answer
Calculate diversity index (dissimilarity index) for a set of compounds in R
I want to calculate the diversity index for a given matrix.
I have a dataset matrix (xmatrix.RData), which is a 986 * 881 matrix, indicating 986 compounds and 881 fingerprints descriptors.
The formula to calculate the diversity index is explained…

BioChemoinformatics
- 715
- 4
- 17
1
vote
2 answers
Algorithm to spread dots evenly on a circle (Shell Model - Chemistry)
I want to create an illustrator script that places dots around a circle.
Let's say the shells are given, but I need a way to evenly spread out a n amount of dots (electrons) on a n-sized circle. For example 2 dots on the first circle, 8 on the…

SHDY
- 33
- 1
- 4
1
vote
4 answers
Preventing double hash operation when trying to update value in a of type Dictionary
I am working on software for scientific research that deals heavily with chemical formulas. I keep track of the contents of a chemical formula using an internal Dictionary where Isotope is an object like "Carbon-13", "Nitrogen-14", and…

Moop
- 3,414
- 2
- 23
- 37
0
votes
3 answers
MySQL - selecting where all other columns = 0
Suppose you have a table with many property fields, such as:
id
datetime
q
a
c
d
.
.
.
(etc)
where q,a,c,d etc denote an indefinite number of int fields whose names are generated (also created at runtime)
How do you select with the constraint that…

ina
- 19,167
- 39
- 122
- 201
0
votes
2 answers
How to Debug Following Program in Xcode
I'm using Xcode 3.2.1 on OSX 10.6.8, and I want to study how Avogadro works by debugging its source code. There is a CMake guide here:
https://web.archive.org/web/20160816105549/http://avogadro.cc/wiki/Compiling_on_Linux_and_Mac_OS_X
that explains…

ejang
- 3,982
- 8
- 44
- 70
0
votes
0 answers
Cython quadrature problem : big array element access
My problem is that I want to to a 3d quadrature on some function. The objective is to compute electronic-integrals. The electron-electron potential integrals being the problem now. I am using 20 Gauss-Chebyshev integration points in each direction…

L Maxime
- 82
- 1
- 8
0
votes
0 answers
How to include a functional JSME (chemical editor) widget in a Voila dashboard and run commands?
EDITED to (I hope) clarify
I'm trying to enhance one of my tools by adding the JSME editor (https://jsme-editor.github.io/) in a ipynb that I render in a Voila dashboard.
Working directly on the ipynb in JupyterHub, I manage to display the widget…

Pepimouth
- 1
- 1