This endpoint calculates the estimated raw material cost per kilogram for chemical compounds and materials. It helps researchers and engineers quickly assess whether a material is economically viable to produce before investing time and resources into synthesis or manufacturing processes.
Calculate the estimated raw material cost per kg
For example, if you're developing a new battery cathode material or catalyst, knowing that the raw materials alone would cost $10,000/kg immediately tells you it's likely not commercially viable, saving wasted research effort.
Dataset powering the material cost calculator. Lists element's USD/kg and when the data was last updated and where it came from.
The system maintains a database containing:
Current market prices for chemical elements (USD per kilogram)
Last updated dates
Source/supplier information
The system reads this data at startup, handling edge cases like:
Elements not traded commercially (e.g., radioactive elements)
Price ranges (takes the average)
Missing or invalid data
When you provide a material structure file (CIF, XYZ, etc.):
The code downloads and parses the structure using ASE (Atomic Simulation Environment)
Identifies all elements present and counts how many atoms of each
Calculates the molecular weight using atomic masses
The core calculation follows these steps:
For each element in the material,
Get its atomic weight and count
Calculate its weight fraction = (atomic_weight × count) / total_molecular_weight
Element cost contribution = element_price × weight_fraction
Sum all contributions for total cost per kg
If some elements lack price data, it calculates partial costs and warns you
If no elements have prices, it returns zero with an explanation
Tracks which elements are missing for transparency
For a material like Co2FePt (RE-free permanent magnet candidate):
{
"message": "Complete cost calculation available for all elements.",
"cost_per_kg": {
"unit": "USD/kg",
"value": 14716.08
},
"is_complete": true,
"missing_elements": [],
"reference_prices": {
"Co": {
"price": 32.8,
"source": "Preismonitor",
"last_updated": "2019"
},
"Fe": {
"price": 0.424,
"source": "SMM",
"last_updated": "2020"
},
"Pt": {
"price": 27800,
"source": "Preismonitor",
"last_updated": "2019"
}
},
"element_breakdown": {
"Co": {
"usd": 10.48,
"grams": 319.598
},
"Fe": {
"usd": 0.06,
"grams": 151.425
},
"Pt": {
"usd": 14705.54,
"grams": 528.976
}
},
"total_molecular_weight": {
"unit": "g/mol",
"value": 368.795
}
}
Material Screening: Quickly eliminate economically unfeasible materials
Cost Optimization: Identify expensive elements to substitute
Supply Chain Planning: Understand raw material costs for budgeting
Research Prioritization: Focus on materials with reasonable costs
Comparative Analysis: Compare costs across material candidates
Does not use spot prices, so prices can be outdated
Doesn't account for:
Processing/synthesis costs
Purity requirements
Minimum order quantities
Regional price variations
Assumes you can buy elements in their pure form
This tool provides a quick "sanity check" on material costs, helping researchers make informed decisions early in the development process.