项目作者: openforcefield

项目描述 :
Fragment molecules for quantum mechanics torsion scans
高级语言: Python
项目地址: git://github.com/openforcefield/openff-fragmenter.git
创建时间: 2018-03-28T19:00:17Z
项目社区:https://github.com/openforcefield/openff-fragmenter

开源协议:Other

下载


Fragmenter

Test Status
Documentation Status
codecov
License: MIT
Software DOI
Paper DOI

A package for fragmenting molecules for quantum mechanics torsion scans.

More information about using this package and its features can be found in the documentation.

Warning: This code is currently experimental and under active development. If you are using this code,
be aware that it is not guaranteed to provide the correct results, and the API can change without notice.

Installation

The package and its dependencies can be installed using the conda package manager:

  1. conda install -c conda-forge openff-fragmenter

Getting Started

We recommend viewing the getting started example in a Jupyter notebook. This full example can be found here.

Here will will show how a drug-like molecule can be fragmented using this framework, and how those fragments can
be easily visualised using its built-in helper utilities.

To begin with we load in the molecule to be fragmented. Here we load Cobimetinib directly using its SMILES
representation using the Open Force Field toolkit:

  1. from openff.toolkit.topology import Molecule
  2. parent_molecule = Molecule.from_smiles(
  3. "OC1(CN(C1)C(=O)C1=C(NC2=C(F)C=C(I)C=C2)C(F)=C(F)C=C1)[C@@H]1CCCCN1"
  4. )

Next we create the fragmentation engine which will perform the actual fragmentation. Here we will use the recommended
WBOFragmenter with default options:

  1. from openff.fragmenter.fragment import WBOFragmenter
  2. frag_engine = WBOFragmenter()
  3. # Export the engine's settings directly to JSON
  4. frag_engine.json()

Use the engine to fragment the molecule:

  1. result = frag_engine.fragment(parent_molecule)
  2. # Export the result directly to JSON
  3. result.json()

Any generated fragments will be returned in a FragmentationResult object. We can loop over each of the generated
fragments and print both the SMILES representation of the fragment as well as the map indices of the bond that the
fragment was built around:

  1. for fragment in result.fragments:
  2. print(f"{fragment.bond_indices}: {fragment.smiles}")

Finally, we can visualize the produced fragments:

  1. from openff.fragmenter.depiction import depict_fragmentation_result
  2. depict_fragmentation_result(result=result, output_file="example_fragments.html")

Copyright (c) 2018, Chaya D. Stern

Acknowledgements

Project based on the
Computational Molecular Science Python Cookiecutter version 1.5.