PubChem now have a REST API serving properties as part of their PUG REST service.
There's a table of available 2D and 3D properties that can be selected, and a variety of input and output formats supported, including database ID, SMILES and SDF input, and JSON/XML/CSV outputs.
For example, to GET
a set of properties for a SMILES string for benzene, in JSON output format:
https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/smiles/c1ccccc1/property/MolecularFormula,MolecularWeight,InChIKey/JSON
Result:
{
"PropertyTable": {
"Properties": [
{
"CID": 241,
"MolecularFormula": "C6H6",
"MolecularWeight": 78.11,
"InChIKey": "UHOVQNZJYSORNB-UHFFFAOYSA-N"
}
]
}
}
You can also move request parameters into a POST
request body, allowing POST
ing of SDF format molecules.
For example, using curl
on the command line to determine the 3D volume of methane:
$ curl --url 'https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/sdf/property/MolecularFormula,Volume3D/JSON' \
--form 'sdf=Untitled
xed2sdf_05210316543D
1 0 0 0 0 0 0 0 0 0999 V2000
-5.1559 1.5833 1.7170 C 0 0 0 0 0 0 0 0 0 0 0 0
M END
$$$$'
Result:
{
"PropertyTable": {
"Properties": [
{
"CID": 297,
"MolecularFormula": "CH4",
"Volume3D": 20.6
}
]
}
}
From a quick test, it appears that properties are pre-calculated for CID database entries matching the query, so it appears that any 3D properties are not calculated on the input conformation, but rather the PubChem database's conformation. The docs suggest this, saying 3D properties are for the "first diverse conformer (default conformer)".