Skip to content

Commit

Permalink
fix: update use of openbabel
Browse files Browse the repository at this point in the history
  • Loading branch information
njzjz committed Jan 2, 2020
1 parent 4c74c81 commit 5ebcc03
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
10 changes: 5 additions & 5 deletions aimdfragmentation/frag.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ def _readpdb(self):
conv.SetInAndOutFormats('xyz', 'pdb')
mol = openbabel.OBMol()
conv.ReadFile(mol, self.xyzfilename)
pdbstring = conv.WriteString(mol)
bond = [[] for x in range(self._natom)]
for line in pdbstring.split('\n'):
if line.startswith("CONECT"):
s = line.split()
bond[int(s[1])-1] += [int(x)-1 for x in s[2:]]
for b in openbabel.OBMolBondIter(mol):
s1 = b.GetBeginAtom().GetId()
s2 = b.GetEndAtom().GetId()
bond[s1].append(s2)
bond[s2].append(s1)
# connect molecules
self._mols = connectmolecule(bond)

Expand Down
11 changes: 3 additions & 8 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
# Automated Fragmentation AIMD Calculation

[![DOI:10.26434/chemrxiv.11462160](https://zenodo.org/badge/DOI/10.1039/C9CP05091D.svg)](https://doi.org/10.26434/chemrxiv.11462160)
[![python version](https://img.shields.io/pypi/pyversions/aimdfragmentation.svg?logo=python&logoColor=white)](https://pypi.org/project/aimdfragmentation)
[![PyPI](https://img.shields.io/pypi/v/aimdfragmentation.svg)](https://pypi.org/project/aimdfragmentation)
[![Build Status](https://travis-ci.com/njzjz/aimdfragmentation.svg?branch=master)](https://travis-ci.com/njzjz/aimdfragmentation)
[![Coverage Status](https://coveralls.io/repos/github/njzjz/aimdfragmentation/badge.svg?branch=master)](https://coveralls.io/github/njzjz/aimdfragmentation?branch=master)
[![codecov](https://codecov.io/gh/njzjz/aimdfragmentation/branch/master/graph/badge.svg)](https://codecov.io/gh/njzjz/aimdfragmentation)

A automated fragmentation method for Ab Initio Molecular Dynamics (AIMD).

Combustion Driven by Fragment-based Ab Initio Molecular Dynamics Simulation, DOI: 10.26434/chemrxiv.11462160

**Author**: Jinzhe Zeng

**Email**: jzzeng@stu.ecnu.edu.cn

## Requirements
* [OpenBabel](https://github.com/openbabel/openbabel)
* [numpy](https://github.com/numpy/numpy)
* [ASE](https://gitlab.com/ase/ase)
* [GaussianRunner](https://github.com/njzjz/GaussianRunner)

## Installation

### Using pip
Expand Down

0 comments on commit 5ebcc03

Please sign in to comment.