In [1]:
import sqlite3

In [3]:
conn = sqlite3.connect('reactionroute.db')

In [4]:
c = conn.cursor()

In [6]:
for row in c.execute('select * from jobArchive'):
    print row


---------------------------------------------------------------------------
OperationalError                          Traceback (most recent call last)
<ipython-input-6-98584e7ec8ad> in <module>()
----> 1 for row in c.execute('select * from jobArchive'):
      2     print row

OperationalError: no such table: jobArchive

In [10]:
from GaussianHelper import *

In [8]:
ls


db.sqlite3  examples/  reaction/         search/  Untitled.ipynb
demo/       manage.py  reactionroute.db  static/

In [9]:
cd search


/home/xsheng/project/reaction-route-search/reactionroute_web/reaction/search

In [11]:
molDict = logParser('gaussian/CC[CH2+].[Br-]0.log')

In [12]:
molDict


Out[12]:
{'energy': 212.7363620746779,
 'formula': 'C3H7+',
 'job specs': 'Gaussian dv # pm6 3-21g opt',
 'result': 'Normal',
 'smiles': 'CC[CH2]'}

In [17]:
mol = pybel.readfile('log', 'gaussian/CC[CH2+].[Br-]0.log').next()

In [18]:
mol.write('can')


Out[18]:
'CC[CH2]\tgaussian/CC[CH2+].[Br-]0.log\n'

In [19]:
import reactionroute

In [21]:
reactionroute.getCanonicalSmiles(mol.OBMol)


Out[21]:
'CC[CH2]\tgaussian/CC[CH2+].[Br-]0.log'

In [22]:
mol.write('smi')


Out[22]:
'[CH2]CC\tgaussian/CC[CH2+].[Br-]0.log\n'

In [23]:
mol.charge


Out[23]:
1

In [ ]: