Skip to content

Commit 7f3a61f

Browse files
authored
Update __init__.py
fix a bug again
1 parent b283828 commit 7f3a61f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ReacNetGenerator/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
###################################
44
## Reaction Network Generator(ReacNetGenerator)
55
## An automatic generator of reaction network for reactive molecular dynamics simulation.
6-
## version 1.1.6
7-
## updated at 2018/6/24 0:00
6+
## version 1.1.7
7+
## updated at 2018/6/24 2:00
88
######### Features #########
99
## * Processing of MD trajectory containing atomic coordinates or bond orders
1010
## * Hidden Markov Model (HMM) based noise filtering
@@ -537,7 +537,7 @@ def handlespecies(species,name,maxspecies,atomname,moleculestructurefilename,sho
537537
return species_out,showname
538538

539539
######## steps ######
540-
def step1(inputfiletype,inputfilename,moleculetempfilename,stepinterval):
540+
def step1(inputfiletype,inputfilename,moleculetempfilename,stepinterval,atomname):
541541
if inputfiletype=="lammpsbondfile":
542542
readNfunc=readlammpsbondN
543543
readstepfunc=readlammpsbondstep
@@ -575,7 +575,7 @@ def run(inputfiletype="lammpsbondfile",inputfilename="bonds.reaxc",atomname=["C"
575575
for runstep in range(1,5):
576576
######## step 1 #####
577577
if(runstep==1):
578-
N,atomtype,step,timestep=step1(inputfiletype,inputfilename,moleculetempfilename,stepinterval)
578+
N,atomtype,step,timestep=step1(inputfiletype,inputfilename,moleculetempfilename,stepinterval,atomname)
579579
######## step 2 #####
580580
elif(runstep==2):
581581
step2(states,observations,p,a,b,originfilename,hmmfilename,moleculetempfilename,moleculetemp2filename,step,runHMM,getoriginfile,printfiltersignal)
@@ -597,7 +597,7 @@ def run(inputfiletype="lammpsbondfile",inputfilename="bonds.reaxc",atomname=["C"
597597
print()
598598

599599
#####draw#####
600-
def draw(tablefilename="table.txt",imagefilename="image.svg",moleculestructurefilename="moleculestructure.txt",species={},node_size=200,font_size=6,widthcoefficient=1,show=False,maxspecies=20,n_color=256,atomname=["C","H","O"],drawmolecule=False,nolabel=False,filter=[],node_color=[135/256,206/256,250/256],pos={},showid=True,k=None):
600+
def draw(tablefilename="table.txt",imagefilename="image.svg",moleculestructurefilename="moleculestructure.txt",species={},node_size=200,font_size=6,widthcoefficient=1,show=False,maxspecies=20,n_color=256,atomname=["C","H","O"],drawmolecule=False,nolabel=False,filter=[],node_color=[132/256,169/256,40/256],pos={},showid=True,k=None):
601601
#start
602602
print("Draw the image:")
603603
timearray=printtime([])
@@ -648,7 +648,7 @@ def draw(tablefilename="table.txt",imagefilename="image.svg",moleculestructurefi
648648
print()
649649
return pos
650650
#### run and draw ####
651-
def runanddraw(inputfiletype="lammpsbondfile",inputfilename="bonds.reaxc",atomname=["C","H","O"],originfilename="originsignal.txt",hmmfilename="hmmsignal.txt",atomfilename="atom.txt",moleculefilename="moleculename.txt",atomroutefilename="atomroute.txt",reactionfilename="reaction.txt",tablefilename="table.txt",moleculetempfilename="moleculetemp.txt",moleculetemp2filename="moleculetemp2.txt",moleculestructurefilename="moleculestructure.txt",imagefilename="image.svg",stepinterval=1,states=[0,1],observations=[0,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=[135/256,206/256,250/256],pos={},printfiltersignal=False,showid=True,k=None):
651+
def runanddraw(inputfiletype="lammpsbondfile",inputfilename="bonds.reaxc",atomname=["C","H","O"],originfilename="originsignal.txt",hmmfilename="hmmsignal.txt",atomfilename="atom.txt",moleculefilename="moleculename.txt",atomroutefilename="atomroute.txt",reactionfilename="reaction.txt",tablefilename="table.txt",moleculetempfilename="moleculetemp.txt",moleculetemp2filename="moleculetemp2.txt",moleculestructurefilename="moleculestructure.txt",imagefilename="image.svg",stepinterval=1,states=[0,1],observations=[0,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=[132/256,169/256,40/256],pos={},printfiltersignal=False,showid=True,k=None):
652652
run(inputfiletype,inputfilename,atomname,originfilename,hmmfilename,atomfilename,moleculefilename,atomroutefilename,reactionfilename,tablefilename,moleculetempfilename,moleculetemp2filename,moleculestructurefilename,stepinterval,states,observations,p,a,b,runHMM,getoriginfile,SMILES,printfiltersignal)
653653
pos=draw(tablefilename,imagefilename,moleculestructurefilename,species,node_size,font_size,widthcoefficient,show,maxspecies,n_color,atomname,drawmolecule,nolabel,filter,node_color,pos,showid,k)
654654
return pos

0 commit comments

Comments
 (0)