Code Monkey home page Code Monkey logo

xyz2mol's Introduction

Convert Cartesian coordinates to one or more molecular graphs

Given Cartesian coordinates in the form of a .xyz file, the code constructs a list of one or more molecular graphs. In cases where there are several possible resonance forms xyz2mol returns a list of all, otherwise just a list of one.

This code is based on the work of DOI: 10.1002/bkcs.10334

Yeonjoon Kim and Woo Youn Kim
"Universal Structure Conversion Method for Organic Molecules:
From Atomic Connectivity to Three-Dimensional Geometry"
Bull. Korean Chem. Soc.
2015, Vol. 36, 1769-1777

Setup

Depends on rdkit, numpy, and networkx. Easiest to setup via anaconda/conda:

conda install -c conda-forge xyz2mol

Setup for a standalone enviroment is avaliable via Makefile. To setup and test simply clone the project and make.

git clone https://github.com/jensengroup/xyz2mol

and then run the following the the xyz2mol folder

make
make test

Note, it is also possible to run the code without the networkx dependencies, but is slower.

Example usage

Read in xyz file and print out the SMILES, but don't incode the chirality.

xyz2mol.py examples/chiral_stereo_test.xyz --ignore-chiral

Read in xyz file and print out the SDF format, save it in a file

xyz2mol.py examples/chiral_stereo_test.xyz -o sdf > save_file.sdf

Read in xyz file with a charge and print out the SMILES

xyz2mol.py examples/acetate.xyz --charge -1

Dependencies:

rdkit # (version 2019.9.1 or later needed for huckel option)
networkx

xyz2mol's People

Contributors

jhjensen2 avatar charnley avatar koerstz avatar ffmulks avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.