/SMARTREE

Primary LanguagePythonMIT LicenseMIT


SMARTREE

A package for generating iterative SMARTS strings for forcefield atomtyping.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact

About The Project

This is an algorithm I made to dynamicly generate SMARTS molecule definitions for forcefield creation.

(back to top)

Getting Started

To get this package up and running follow these simple example steps.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • enviroment activation
conda env create -f enviroment.yml
conda activate SMARTREE

Installation

  • package installation
 git clone https://github.com/kierannp/SMARTREE.git
 cd SMARTREE
 pip install -e .

(back to top)

Usage

import networkx as nx
import mbuild as mb
import sTree

smiles = "C(CO)NCCO" # Diethanolamine

mol = mb.load(smiles, smiles=True) # converts the smiles into a mb.Compound

BG = mol.bond_graph # the bond graph of our molecule, atoms connected by bonds represented as a Set of source atom to destination atoms

depth = 2 # this parameter determines how large the smart tree should be generated, the larger the depth the more specific your SMARTS definition is, but the more expensive it is to atomtype 
smarts_dict = sTree.bond_graph_to_smarts_dic(BG, depth) # returns our smarts in a dictionary with mb.Compound atoms as keys and the corresponding smarts as values

For more examples, please refer to the Documentation

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Kieran Nehil-Puleo - nehilkieran@gmail.com

Project Link: https://github.com/kierannp/SMARTREE

(back to top)