3
3
###################################
4
4
## Reaction Network Generator(ReacNetGenerator)
5
5
## 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
8
8
######### Features #########
9
9
## * Processing of MD trajectory containing atomic coordinates or bond orders
10
10
## * Hidden Markov Model (HMM) based noise filtering
@@ -537,7 +537,7 @@ def handlespecies(species,name,maxspecies,atomname,moleculestructurefilename,sho
537
537
return species_out ,showname
538
538
539
539
######## steps ######
540
- def step1 (inputfiletype ,inputfilename ,moleculetempfilename ,stepinterval ):
540
+ def step1 (inputfiletype ,inputfilename ,moleculetempfilename ,stepinterval , atomname ):
541
541
if inputfiletype == "lammpsbondfile" :
542
542
readNfunc = readlammpsbondN
543
543
readstepfunc = readlammpsbondstep
@@ -575,7 +575,7 @@ def run(inputfiletype="lammpsbondfile",inputfilename="bonds.reaxc",atomname=["C"
575
575
for runstep in range (1 ,5 ):
576
576
######## step 1 #####
577
577
if (runstep == 1 ):
578
- N ,atomtype ,step ,timestep = step1 (inputfiletype ,inputfilename ,moleculetempfilename ,stepinterval )
578
+ N ,atomtype ,step ,timestep = step1 (inputfiletype ,inputfilename ,moleculetempfilename ,stepinterval , atomname )
579
579
######## step 2 #####
580
580
elif (runstep == 2 ):
581
581
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"
597
597
print ()
598
598
599
599
#####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 ):
601
601
#start
602
602
print ("Draw the image:" )
603
603
timearray = printtime ([])
@@ -648,7 +648,7 @@ def draw(tablefilename="table.txt",imagefilename="image.svg",moleculestructurefi
648
648
print ()
649
649
return pos
650
650
#### 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 ):
652
652
run (inputfiletype ,inputfilename ,atomname ,originfilename ,hmmfilename ,atomfilename ,moleculefilename ,atomroutefilename ,reactionfilename ,tablefilename ,moleculetempfilename ,moleculetemp2filename ,moleculestructurefilename ,stepinterval ,states ,observations ,p ,a ,b ,runHMM ,getoriginfile ,SMILES ,printfiltersignal )
653
653
pos = draw (tablefilename ,imagefilename ,moleculestructurefilename ,species ,node_size ,font_size ,widthcoefficient ,show ,maxspecies ,n_color ,atomname ,drawmolecule ,nolabel ,filter ,node_color ,pos ,showid ,k )
654
654
return pos
0 commit comments