Comments (2)
Hi Peter,
I always recommend strongly against searching by formula because formulas are NOT unique. If you really want to find a chemical by formula, you can do so as follows:
import chemicals
chemicals.identifiers.pubchem_db.search_formula('CO', autoload=True)
You will have to deal with potentially having a different chemical returned in the future though, although I'm not aware of another chemical with that formula in this case.
For example, C12H26 has 347 compounds in thermo.
Sincerely,
Caleb
from chemicals.
I completely understand the issues for higher alkanes etc. which have many isomers, and indeed there's no reasonable way of defining a cut-off.
I think it's worth considering whether the current priority of "formula after smiles" is a good one in general, especially given that one can already search by smiles explicitly using the smiles=
prefix.
In my particular case (catalysis), nobody is going to call CO by the full name anywhere in their data tables. chemicals
does a great job at disambiguating stuff like C3H6
, propylene
, propene
to ensure it's the same molecule (smiles=CCC
); however I'd argue that CO
and methanol
/ MeOH
should never both evaluate to smiles=CO
as it's super unexpected (although technically correct).
Cheers!
from chemicals.
Related Issues (20)
- conda-forge Package Missing HOT 5
- Update GWPs for IPCC Report version 5 HOT 2
- Pandas' new high-precision csv float parser is sometimes quite low precision HOT 1
- Problem with Antoine's coefficients for Toluene HOT 1
- The vectorized submodule is not fully supported throughout the package HOT 6
- numba_vectorized reports TypeError HOT 3
- incorrect separators on water synonyms HOT 7
- Incorrect calculation of density when using saturation temperature as input HOT 2
- Get chemical name from chemical notation HOT 3
- GWP IPCC 5th edition (2018)
- Nitrogen Lennard-Jones values missing HOT 2
- Vs in COSTALD_compressed should be Vsat?
- Many chemicals input are found but no data given
- Incorrect formula for dichlorosilane and trichlorosilane
- `TypeError` when operating in no-JIT mode HOT 2
- Steam density calculations change significantly with new release HOT 3
- Adding chemical ID: 157846
- The attribute "ionization" is listed twice with different descriptions HOT 1
- documentation: incorrect latex rendering
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chemicals.