<jupyter_start><jupyter_text>First StepsThe [Molecular Sciences Software Institute](https://molssi.org) hosts the Quantum Chemistry Archive (QCArchive) and makes this data available to the entire Computational Molecular Sciences community free of charge. The QCArchive is both a database to view, analyze, and explore existing data as well as a live instance that continuously generates new data as directed by the community.The primary interface to this database in Python is a through a ``FractalClient`` from the ``qcportal`` package which can be downloaded via pip (`pip install -e qcportal`) or conda (`conda install qcportal -c conda-forge`). A new ``FractalClient`` automatically connects to MolSSI's central server and has access to all data contained within the QCArchive.<jupyter_code>import qcportal as ptl
client = ptl.FractalClient()
client<jupyter_output><empty_output><jupyter_text>Finding CollectionsOne of the main ways to explore the QCArchive is to examine `Collection`s which are structures that allow easy manipulation of data in preset ways. Several example of `Collection`s contained within the QCArchive are as follows: - `Dataset` - A dataset where each record corresponds to a single molecule, with one or more QM methods applied to that molecule. - `ReactionDataset` - A dataset where each record is a combination of molecules (e.g. interaction and reaction energies). Each record contains data from one or more QM methods. - `OptimizationDataset` - A dataset where each record represents geometry optimization of a molecule. - `TorsionDriveDataset` - A dataset which organizes many molecular torsion scans together for data exploration, analysis, and methodology comparison (see the [TorsionDrive Dataset example](https://docs.qcarchive.molssi.org/en/latest/basic_examples/torsiondrive_datasets.html) for more details).<jupyter_code>client.list_collections().head()<jupyter_output><empty_output><jupyter_text>Specific `Collection` types can be queried to limit the amount of collections to browse through:<jupyter_code>client.list_collections("reactiondataset").head()<jupyter_output><empty_output><jupyter_text>Exploring CollectionsCollections can be obtained by pulling their data from the central server. A collection is primarily metadata and extremely large collections can be pulled in a few seconds. For this example, we will explore S22 dataset which is a small interaction energy dataset of 22 common dimers such as the water dimer, methane dimer, and more. To obtain this collection:<jupyter_code>ds = client.get_collection("ReactionDataset", "S22")
print(ds)<jupyter_output>ReactionDataset(name=`S22`, id='184', client='https://api.qcarchive.molssi.org:443/')<jupyter_text>Statistics and VisualizationVisual statics and plotting can be generated by the ``visualize`` command:<jupyter_code>ds.visualize(method="B2PLYP", basis=["def2-svp", "def2-tzvp"], bench="S220", kind="violin")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.07494065785011868, 'fraction_numerical': 0.00678195998643608, 'mean_word_length': 6.506361323155216, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '419795', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 822, 'n_tokens_neox': 763, 'n_words': 329, 'path': 'basic_examples/getting_started.ipynb', 'repo_name': 'mattwelborn/QCArchiveExamples', 'size': '2949'}