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
0
votes
1 answer
How to display counts using the periodic table with ggplot?
I have a list of elemental compositions and I'd like to display a count for the number of times an element is included in a composition mapped onto the periodic table (e.g. CH4 would increase the count on H and C by one).
How can I do this with…

wdkrnls
- 4,548
- 7
- 36
- 64
0
votes
1 answer
R: quickly match records based on custom distance function and multiple criteria
I made some functions in R to match up chemical mass spectra (a matrix with two columns with integer masses and intensities) to libraries of such spectra based on a custom spectral similarity function and matching of the so-called retention index of…

Tom Wenseleers
- 7,535
- 7
- 63
- 103
0
votes
1 answer
ChemoSpec can't find getManyCsv function
I'm trying to create the Spectra object (.RData), just like suggested on ChemoSpec.pdf (see the code below), and I get an error message like this:
"could not find getManyCsv function"
How can I fix it? Any suggestion is appreciated. I have R version…

awel.llwyd
- 63
- 1
- 1
- 4
0
votes
1 answer
netlogo programming question - catalyst implementation part 2
the catalyst speeds up the reaction but remains unchanged after the reaction has taken place
i tried the following code
breed [catalysts catalyst]
breed [chemical-x chemical-x]
;then the forward reaction is sped up by the existence of catalysts…

user286190
- 41
- 3
0
votes
3 answers
Building a Protein Data Bank (PDB) file
I have to model a complex polymer of lysine. It resembles a protein, except the lysines don't always bound with their alpha amine. My goal is to produce a PDB (Protein Data Bank) for further calculations.
Do you know any module allowing me to build…

JPFrancoia
- 4,866
- 10
- 43
- 73
0
votes
2 answers
to get properties of a residue from pdb file
I have a pdb file and I want to parse the pdb using python and I want to find the following for residues in pdb:
1. hydrophobicity
2. interface topology
3. solvent accessible surface area
I have tried using pybel
file_name = "4hhb.pdb"
allmols =…

sam
- 18,509
- 24
- 83
- 116
0
votes
2 answers
DBPedia queries missing certain chemical compounds
I am running this query to get list of all compounds from the DBPedia public SPARQL endpoint.
SELECT * WHERE {
?y rdf:type dbpedia-owl:Drug.
?y rdfs:label ?Name .
OPTIONAL {?y dbpedia-owl:iupacName ?iupacname} .
OPTIONAL {?y dcterms:subject…

LordCommander
- 91
- 2
- 9
0
votes
1 answer
What will be a efficient searching mechanism to traverse through 200+ chemistry reaction library
Im currently developing an organic conversion simulator which would help to generate in-between steps of the conversion when the starting compound and the ending compound is been provided. I'm in search of a searching mechanism to get the in-between…

user2550882
- 13
- 5
-1
votes
1 answer
Converting .CIF files to a dataset (csv, xls, etc)
how are you all? Hope you're doing good!
So, get this. I need to convert some .CIF files (found here: https://www.ccdc.cam.ac.uk/support-and-resources/downloads/ - MOF Collection) to a format that i can use with pandas, such as CSV or XLS. I'm…

CountZer0
- 11
- 4
-1
votes
1 answer
Splitting a mol2 text file for every nth occurrences of a string in bash and printing to subfiles
I am trying to separate a text file containing millions of molecules in mol2 format using bash. An example of the code below is shown. The repeating string is @MOLECULE so I would like to use this to write subfiles every nth occurrence of…

ADFranzen
- 3
- 3
-1
votes
1 answer
Graphs and Le Chatelier’s Principle
I am try make graphs used scipy and matplotlib, my idea is variable k and concentration in for interactive graphics for equilibrium chemistry. Maybe my equation have error, no make graphics type example bellow, just one example graph finale
import…

Fabio Lima
- 67
- 1
- 8
-1
votes
1 answer
How can I get batch physicochemical properties for molecule names?
Normally I use Chemspider webservice client (WSDL) with the help of Knime generic web service clients to convert a list of molecule names into a table containing molecular properties (physicochemical prperties,...). Now, Chemspider has suspended its…

Farbod Shahabi
- 1
- 1
-1
votes
1 answer
How to plot only highest y-values for each x-value in a list of [x,y] values
I am trying to plot a graph/chromatogram of the x and y-values located in time_dependent_intensities, but only the ones with the largest y-values.
run = pymzml.run.Reader(in_path)
time_dependent_intensities = []
for spectrum in run:
…

Tommy Holt
- 1
- 1
-1
votes
1 answer
Molecular mass calculator
I am doing a project in university and I'm working on molecular mass calculator.
This is the code I made.
element_mass = {'H': 1.00794, 'He': 4.002602, 'Li': 6.941, 'Be': 9.012182, 'B': 10.811, 'C': 12.0107, 'N': 14.0067,
'O': 15.9994,…

xxx
- 1
-1
votes
2 answers
How can I make it so that when a button is clicked in Tkinter, any and all labels currently displayed on the screen are replaced with the new label?
So I am working on an interactive periodic table project in Python, and am using Tkinter. I have buttons on it that, when clicked, provide info about the element named on the button. It outputs this as a label, and automatically goes away after 5.5…

Alexander Dua
- 1
- 3