You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*Note: This table shows key convenience functions for demonstration. ChemInformant provides **22 convenience functions** in total, covering molecular descriptors, mass properties, stereochemistry, and more.*
107
108
108
109
*All functions accept a **CID, name, or SMILES** and return `None`/`[]` on failure.*
Copy file name to clipboardExpand all lines: docs/source/advanced_usage.rst
+10-5Lines changed: 10 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,9 @@ Application in Real-World Scientific Workflows
4
4
5
5
The core value of ChemInformant lies in its role as a starting point for data science workflows, seamlessly injecting chemical data into Python's powerful scientific computing ecosystem. This page will demonstrate through three cases that more closely resemble real-world research scenarios how ChemInformant can be combined with advanced libraries like **RDKit**, **Scikit-learn**, and **NetworkX** to accomplish diverse tasks ranging from data preprocessing and multi-class classification to community detection.
6
6
7
+
.. note::
8
+
All examples use ChemInformant's standardized **snake_case** property names for consistent data handling across workflows.
9
+
7
10
.. note::
8
11
The examples on this page depend on additional specialized libraries.
9
12
@@ -100,12 +103,14 @@ We can use the **data obtained from ChemInformant** as features to train a machi
100
103
ids.extend(drugs)
101
104
labels.extend([cls] *len(drugs))
102
105
103
-
# 2. Use ci to get feature data and calculate TPSA with RDKit
Copy file name to clipboardExpand all lines: docs/source/basic_usage.rst
+29-6Lines changed: 29 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,22 @@
1
-
==========
1
+
===========
2
2
Basic Usage
3
-
==========
3
+
===========
4
4
5
5
This guide covers the fundamental features of the ChemInformant library, designed to help users quickly get started with common chemical information query tasks.
The most central feature of ChemInformant is :func:`~ChemInformant.get_properties`. This function is designed for batch processing, allowing users to query multiple chemical properties for a group of compounds in a single call. This approach is significantly more efficient than querying each compound individually in a loop because it effectively consolidates network requests.
15
15
16
-
The function accepts a list of various identifiers (such as common names, PubChem CIDs, or SMILES strings) and returns a structured Pandas DataFrame, ready for direct use in subsequent data analysis.
16
+
The function accepts a list of various identifiers (such as common names, PubChem CIDs, or SMILES strings) and returns a structured Pandas DataFrame with **standardized snake_case column names**, ready for direct use in subsequent data analysis.
17
+
18
+
.. note::
19
+
**Snake_case Property Names**: ChemInformant uses consistent snake_case naming (e.g., ``molecular_weight``, ``h_bond_donor_count``) for all returned data. Both snake_case and CamelCase inputs are accepted, but output is always standardized.
17
20
18
21
.. code-block:: python
19
22
@@ -24,7 +27,7 @@ The function accepts a list of various identifiers (such as common names, PubChe
24
27
# (Aspirin, Caffeine, Acetaminophen)
25
28
identifiers = ['aspirin', 'caffeine', 1983]
26
29
27
-
# 2. Specify the properties you want to fetch
30
+
# 2. Specify the properties you want to fetch (using snake_case names)
# Both approaches are much more efficient than multiple API calls
65
+
66
+
The ``all_properties=True`` option retrieves every available property from PubChem, including core properties, 3D descriptors, and special properties like CAS numbers and synonyms. The ``include_3d=True`` option adds 3D molecular descriptors to the default core property set.
46
67
47
68
------------------------------------------------
48
69
Getting Complete Information for a Single Compound
@@ -109,6 +130,8 @@ Output:
109
130
CAS number for water: 7732-18-5
110
131
Molecular formula of ethanol: C2H6O
111
132
133
+
ChemInformant provides **22 convenience functions** for individual properties, covering molecular descriptors, structural features, mass properties, and identifiers. All functions return None for compounds that cannot be found, making error handling straightforward.
Copy file name to clipboardExpand all lines: docs/source/cli.rst
+62-12Lines changed: 62 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,18 +33,38 @@ ChemInformant provides a suite of command-line interface (CLI) tools, designed t
33
33
34
34
.. option:: --props <property_list>
35
35
36
-
A comma-separated list of properties to precisely specify which data to retrieve for each identifier. If the user does not provide this option, `chemfetch` will use a default set of properties: ``cas,molecular_weight,iupac_name``.
36
+
A comma-separated list of properties to precisely specify which data to retrieve for each identifier. If the user does not provide this option, `chemfetch` will use the default core property set (20+ essential properties including molecular_weight, formula, smiles, etc.).
37
37
38
-
The complete list of available properties includes:
**3D Properties** (available with ``--include-3d``):
63
+
64
+
* ``volume_3d``: 3D molecular volume.
65
+
* ``feature_count_3d``, ``feature_acceptor_count_3d``, etc.: 3D pharmacophore features.
66
+
* ``conformer_count_3d``: Number of conformers.
67
+
* And more spatial descriptors...
48
68
49
69
.. option:: -f, --format <format_type>
50
70
@@ -55,6 +75,14 @@ ChemInformant provides a suite of command-line interface (CLI) tools, designed t
55
75
* ``json``: JSON array output.
56
76
* ``sql``: Writes to a SQLite database (requires ``--output``).
57
77
78
+
.. option:: --include-3d
79
+
80
+
Include 3D molecular descriptors in addition to the default core properties. This option is ignored when ``--props`` is specified. The 3D properties include volume_3d, feature_count_3d, conformer_count_3d, and other spatial descriptors.
81
+
82
+
.. option:: --all-properties
83
+
84
+
Retrieve all ~40 available properties from PubChem, including core properties, 3D descriptors, and special properties like CAS and synonyms. This option is mutually exclusive with ``--props`` and ``--include-3d``.
85
+
58
86
.. option:: -o, --output <file_path>
59
87
60
88
Specifies the path for the output file. Required for ``--format sql`` and ignored otherwise.
@@ -75,7 +103,29 @@ ChemInformant provides a suite of command-line interface (CLI) tools, designed t
75
103
aspirin 2244 OK 50-78-2 180.16 2-(acetyloxy)benzoic acid
76
104
caffeine 2519 OK 58-08-2 194.19 1,3,7-trimethylpurine-2,6-dione
0 commit comments