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
2
votes
1 answer
ValueError: object too deep for desired array in optimize.curve_fit
I am trying to fit a kinetic model for population growth and decay of four variables A,B,C,D in a chemical system. I am trying to solve the following set of equations, which I have attached in matrix form:
Matrix form of equations
where t is a time…

acleveronlinename
- 47
- 1
- 6
2
votes
1 answer
How to load .prmtop and .crd files from Amber using MDAnalysis?
I am trying to load a .crd file from Amber, but this fails because it's not in the format MDAnalysis expect (see error at the end):
topology = 'top.prmtop'
trajectory = 'amberOut.crd'
u = MDAnalysis.Universe(topology, trajectory)
I saw this thread…

0x90
- 39,472
- 36
- 165
- 245
2
votes
1 answer
A python function that discards molecules that are too similar based on Tanimoto coefficient?
I am trying to write a python function that takes two lists as input: one that contains some molecules SMILES codes and another one that contains the molecule names.
Then it calculates the TANIMOTO coefficient between all pairs of molecules (I…

user3091644
- 419
- 5
- 7
2
votes
1 answer
Converting davenport diagram
I'm an intern at the education department of a hospital, I've been tasked to turn a davenport diagram into a working interactive tool so the teachers can use it in their presentations.
I have no background/knowledge in chemistry or equation…

Michel de Nijs
- 406
- 5
- 16
2
votes
0 answers
Scipy Curve fitting multiple plots simultaneously
I am very new to Scipy and am already very impressed. I was hoping to use the ODEint and curve fitting to do some simple chemical kinetics modelling. Basically I am integrating an equation to get y values, then fitting this to some data that I am…

DrPeter
- 21
- 3
2
votes
1 answer
Netlogo Programming question - Chemical Equilibrium temperature and pressure implementation
I am trying to code something in Netlogo..I am using an existing model Chemical Equilibrium and am trying to implement the following:
turtles-own [speed ]
ask turtles
[
;; set velocity ( ambient-temperature = 30 )
;; fd velocity
if temp > 40 […

user286190
- 41
- 3
2
votes
3 answers
Isolate the first number after a letter with regular expressions
I am trying to parse a chemical formula that is given to me in unicode in the format C7H19N3
I wish to isolate the position of the first number after the letter, I.e 7 is at index 1 and 1 is at index 3. With is this i want to insert "sub" infront of…

JayBoux
- 239
- 3
- 6
2
votes
1 answer
Electron Configuration Logic
I am trying to create a method (in java) to figure out the Electron Configuration for an element.
Ex. He (2nd element: 2 electrons) Electron config: 1s2
O (8th element 8 electrons) Electron config: 1s2 2s2 2p4
Zr (40th element 40 electrons)…

user2057643
- 45
- 1
2
votes
3 answers
python with .pdb files
I am working on bio project.
I have .pdb (protein data bank) file which contains information about the molecule.
I want to find out the following of a molecule in the .pdb file:
Molecular Mass.
H bond donor.
H bond acceptor.
LogP. …

sam
- 18,509
- 24
- 83
- 116
2
votes
2 answers
Embedding a lot of constants in compile code or an external file
I'm developing scientific software that needs access to the periodic table of elements. An Element comprises of a set of Isotopes which have a few readonly properties (e.g. mass, abundance, atomic number, etc.). There are over 100 elements, and when…

Moop
- 3,414
- 2
- 23
- 37
1
vote
3 answers
Searching matrices in Mathematica 8 - Trying to find other elements on the same row as X
The text in italics describes my general goal, if anyone is interested. Question is underneath.
I am trying to graph the energy levels of simple molecules using Mathematica 8. My method is crude, and goes as this:
Find eigenvalues of simple Hückel…

CHM
- 317
- 1
- 2
- 12
1
vote
1 answer
Setting 'ball and stick' as default for new molecules in pymol
I would like to have new molecules imported in pymol to be preset as 'ball and stick'.
I cannot find a way to make this a default setting, preferably in the pymol.rc.
In the command line,
preset.ball_and_stick(selection='all', mode=1)
is what gets…

user21101711
- 11
- 1
1
vote
0 answers
Python: Mapping properties of products to original precursors, to see how process changes properties
There's a list of precursor chemicals and their computed properties, as determined by a program. The list of metabolites also got their properties computed. The list of metabolites isn't the same length as the list of precursors, also, they are not…

user22233907
- 13
- 3
1
vote
1 answer
I don't know how to make the molecules to be displayed
Here is the code of my program.
This program is made for people to make a Gas molecule Simulation.
When you press the Addmolecule button in the Ui, molecules should be displayed randomly on the Ui. However, it doesn't work.
I need help....
import…

1207권태형
- 11
- 1
1
vote
1 answer
Incorrect results in ground state evaluation via Qiskit Nature when using Qiskit Aer Estimator
I am using the Qiskit Aer estimator in order to evaluate the ground state of molecules via qiskit nature on local simulators using vqe, with and without noise model. My results are completely off.
To illustrate the problem, let me add here the…