Skip to content

Commit

Permalink
Fix several bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
njzjz committed Jul 18, 2018
1 parent b968be4 commit e4b9927
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions ReacNetGenerator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
###################################
## Reaction Network Generator(ReacNetGenerator)
## An automatic generator of reaction network for reactive molecular dynamics simulation.
## version 1.2.3
## updated at 2018/7/17 20:00
## version 1.2.4
## updated at 2018/7/18 11:00
## Author: Jinzhe Zeng
## Email: [email protected] [email protected]
######### Features #########
Expand Down Expand Up @@ -56,7 +56,7 @@
######## class ########
class ReacNetGenerator(object):
def __init__(self,inputfiletype="lammpsbondfile",inputfilename="bonds.reaxc",atomname=["C","H","O"],originfilename=None,hmmfilename=None,atomfilename=None,moleculefilename=None,atomroutefilename=None,reactionfilename=None,tablefilename=None,moleculetempfilename=None,moleculetemp2filename=None,moleculestructurefilename=None,imagefilename=None,stepinterval=1,p=[0.5,0.5],a=[[0.999,0.001],[0.001,0.999]],b=[[0.6, 0.4],[0.4, 0.6]],runHMM=True,SMILES=True,getoriginfile=False,species={},node_size=200,font_size=6,widthcoefficient=1,show=False,maxspecies=20,n_color=256,drawmolecule=False,nolabel=False,filter=[],node_color=[78/256,196/256,238/256],pos={},printfiltersignal=False,showid=True,k=None,start_color=[1,1,1],end_color=[0,0,0]):
self.version="1.2.2"
self.version="1.2.4"
print("======= ReacNetGenerator "+self.version+" ======")
print("Author: Jinzhe Zeng")
print("Email: [email protected] [email protected]")
Expand Down Expand Up @@ -547,7 +547,7 @@ def printmoleculename(self):
mname=[]
d={}
em = iso.numerical_edge_match(['atom','level'], ["None",1])
with open(self.moleculefilename, 'w') as fm,open(self.moleculetempfilename) as ft,open(self.moleculestructurefilename,'w') as fs:
with open(self.moleculefilename, 'w') as fm,open(self.moleculetemp2filename) as ft,open(self.moleculestructurefilename,'w') as fs:
for line in ft:
list=line.split()
atoms=np.array([int(x) for x in list[0].split(",")])
Expand Down Expand Up @@ -589,7 +589,7 @@ def calmoleculeSMILESname(self,item):

def printmoleculeSMILESname(self):
mname=[]
with open(self.moleculefilename, 'w') as fm,open(self.moleculetempfilename) as ft,Pool(maxtasksperchild=100) as pool:
with open(self.moleculefilename, 'w') as fm,open(self.moleculetemp2filename) as ft,Pool(maxtasksperchild=100) as pool:
semaphore = Semaphore(360)
results=pool.imap(self.calmoleculeSMILESname,self.produce(semaphore,ft,()),10)
for result in results:
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from setuptools import setup
setup(name='ReacNetGenerator',
version='1.2.3',
version='1.2.4',
description='Reaction Network Generator',
keywords="reaction network",
url='https://github.com/njzjz/ReacNetGenerator',
author='Jinzhe Zeng',
author_email='[email protected]',
packages=['ReacNetGenerator'],
install_requires=['numpy','scipy','networkx','sklearn','matplotlib','hmmlearn'])
install_requires=['numpy','scipy','networkx','scikit-learn','matplotlib','hmmlearn'])

0 comments on commit e4b9927

Please sign in to comment.