-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathworkflow_part.py
2631 lines (2352 loc) · 83.5 KB
/
workflow_part.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
def workflow_simu_to_mysql_pin_hex_to_honeycomb(index1,lcr,seed=9):#num
R"""
INTRODUCTION:
OLD_NAME:workflow_simu_to_mysql_pin_hex_to_honeycomb_repeat
Parameters:
initial state: hex3-16-8
traps:honeycomb3-8-12
safe lcr: [0.71,1.00]
Examples1:
#scan seed
seed=0
while seed<9.5:
#pin sequence-GPU
index1=2043
lcr1=0.74#less than 0.71 is dangerous! some particles may not effected by trap!
while lcr1<0.845:
tt.workflow_simu_to_mysql_pin_hex_to_honeycomb_repeat(index1=index1,lcr=lcr1,seed=seed)
index1=index1+10
lcr1=lcr1+0.01
seed+=1
Examples2:
#scan seed
seed=0
while seed<9.5:
#pin sequence-GPU
index1=2363
lcr1=0.76#less than 0.71 is dangerous! some particles may not effected by trap!
while lcr1<0.805:
end_index=tt.workflow_simu_to_mysql_pin_hex_to_honeycomb_repeat(index1=index1,lcr=lcr1,seed=seed)
index1=end_index+1#index1=index1+10
lcr1=lcr1+0.01
seed+=1
"""
#step1
#pin check
R"""
import getDataAndScatter as scatt
scatt.showTrapsMap()
#traps:"testhoneycomb3-8-12"lcr=0.71
#particle:"testhex3-16-8"
#"check_init_pin_hex_to_honeycomb.png"
size_par < size_trap checked right!
"""
#step2
#set parameters
k1=0.0
stp=10.0
kend=90.0
#get simulation results
import symmetry_transformation_v2_9.symmetry_transformation_auto_honeycomb_pin as sa_k
end_index=sa_k.workflow(index1=index1,k1=k1,step=stp,k_end=kend,linear_compression_ratio=lcr,seed_set=seed)
'get file index123'
#step3
#get analyzed data
import data_analysis_cycle as da
filename_klp=da.saveIndexPsi3Psi6R(start_index=index1,end_index=end_index,k1=k1,step=stp,linear_compression_ratio=lcr,randomseed=seed)
#filename_kl=da.saveIndexPsi(start_index=206,end_index=215,k1=k1,step=stp,linear_compression_ratio=0.79)
print('\n'+filename_klp)
'get file named index1 index2 kl'
#step4
#loadDataToMysql
R"""
Note: the format of table_name='pin_hex_to_honeycomb_repeat'
simu_index | HarmonicK | LinearCompressionRatio | Psi3Global | Psi6Global | RandomSeed
"""
import opertateOnMysql as osql
osql.loadTxtDataToMysql(path_to_file_name=filename_klp,table_name="pin_hex_to_honeycomb_repeat")#"/home/tplab/Downloads/193-205kl"
return end_index
def workflow_simu_to_mysql_pin_hex_to_honeycomb_oop(account,index1,lcr,seed=9):
R"""
INTRODUCTION:
Parameters:
initial state: hex3-16-8
traps:honeycomb3-8-12
safe lcr: [0.71,1.00]
Examples1:
#scan seed
seed=0
while seed<10:
#pin sequence-GPU
index1=2043
lcr1=0.74#less than 0.71 is dangerous! some particles may not effected by trap!
while lcr1<0.845:
end_index = tt.workflow_simu_to_mysql_pin_hex_to_honeycomb_oop(index1=index1,lcr=lcr1,seed=seed)
index1=end_index+1
lcr1=lcr1+0.01
seed+=1
"""
#step1
#pin check
R"""
import getDataAndScatter as scatt
scatt.showTrapsMap()
#traps:"testhoneycomb3-32-48-part1"lcr=0.71
#particle:"testhex3-64-32"
#"4-times-size.png"
size_par < size_trap checked right!
"""
#step2
#set parameters
k1=100.0
stp=100.0
kend=1000.0
trap_name = "testhoneycomb3-32-48-part1"
#get simulation results
import symmetry_transformation_v2_9.pin_seed_oop as pin
"""
wk = pin.workflow_pin(index1,"remote",k1,stp,kend,lcr,seed,trap_name)
wk.set_init_state_pin(a=3,nx=64,ny=32)
end_index = wk.workflow()
"""
end_index =3565
#end_index=sa_k.workflow(index1=index1,k1=k1,step=stp,k_end=kend,linear_compression_ratio=lcr,seed_set=seed)
'get file index123'
#step3
#get analyzed data
import data_analysis_cycle as da
filename_klp=da.saveIndexPsi3Psi6R(account=account,start_index=index1,end_index=end_index,k1=k1,step=stp,linear_compression_ratio=lcr,randomseed=seed) #filename_kl=da.saveIndexPsi(start_index=206,end_index=215,k1=k1,step=stp,linear_compression_ratio=0.79)
print('\n'+filename_klp)
'get file named index1 index2 kl'
#step4
#loadDataToMysql
R"""
Note: the format of table_name='pin_hex_to_honeycomb_edge_cut'
simu_index | HarmonicK | LinearCompressionRatio | Psi3Global | Psi6Global | RandomSeed
"""
import opertateOnMysql as osql
osql.loadTxtDataToMysql(path_to_file_name=filename_klp,table_name="pin_hex_to_honeycomb_edge_cut")#"/home/tplab/Downloads/193-205kl"
#step5
#watch kT limitation while melting
import data_analysis_cycle as da
i=index1
while i<3566:
da.save_from_gsd(simu_index=i,seed=seed,final_cut=True,
bond_plot =True,
show_traps=False,
trap_filename="/home/"+account+"/hoomd-examples_0/testhoneycomb3-8-12-part1",
trap_lcr=0.79,
account=account)
i+=1
return end_index
def workflow_simu_to_mysql_pin_hex_to_honeycomb_oop_klt_2m(index1,lcr,kT=1.0,seed=9,account='tplab',check=True):
R"""
INTRODUCTION:
Parameters:
initial state: hex3-16-8
traps:honeycomb3-8-12
safe lcr: [0.71,1.00]
Examples1:
index1=4686
lcr1=0.816#less than 0.71 is dangerous! some particles may not effected by trap!
tt.workflow_simu_to_mysql_pin_hex_to_honeycomb_oop_klt_2m(index1=index1,lcr=lcr1,account='remote')
example2:
#pin sequence-GPU
index1=4576
lcr1=0.74#less than 0.71 is dangerous! some particles may not effected by trap!
while lcr1<0.845:
end_index = tt.workflow_simu_to_mysql_pin_hex_to_honeycomb_oop_klt_2m(index1=index1,lcr=lcr1,account='remote')
index1=end_index+1
lcr1=lcr1+0.01
exp3:
#pin sequence-GPU
import workflow_part as tt
import numpy
lcr_list = numpy.linspace(0.77,0.85,9)
lcr_list[-1] = 0.816
#print(lcr_list)
index1=5209
for lcr1 in lcr_list:
end_index = tt.workflow_simu_to_mysql_pin_hex_to_honeycomb_oop_klt_2m(index1=index1,lcr=lcr1,account='remote')
#print(index1,end_index,lcr1)
index1=end_index+1
"""
#step1
#pin check
R"""
import getDataAndScatter as scatt
scatt.draw_points_and_traps_preview(draw_points=True,show=False,account='remote')
#traps:"testhoneycomb3-8-12"lcr=0.71
#particle:"testhex3-16-8"
#"lcr0.71~k100honeycomb3-8-12&hex3-16-8.png"
size_par < size_trap checked right!
"""
#step2
#set parameters
k1=33.0
stp=3.0
kend=60.0
trap_name = "testhoneycomb3-8-12"
#get simulation results
if not check:
import symmetry_transformation_v2_9.pin_seed_oop as pin
wk = pin.workflow_uniform(index1,account,k1,stp,kend,lcr,kT,seed,trap_name,mode="--mode=gpu")
end_index = wk.workflow()
else:
end_index = index1 +9#
#end_index =3565
#end_index=sa_k.workflow(index1=index1,k1=k1,step=stp,k_end=kend,linear_compression_ratio=lcr,seed_set=seed)
'get file index123'
#step3
#get analyzed data
if not check:
import data_analysis_cycle as da
filename_klp=da.saveIndexklTPsi36Seed(start_index=index1,end_index=end_index,k1=k1,step=stp,linear_compression_ratio=lcr,kT=kT,randomseed=seed,account=account) #filename_kl=da.saveIndexPsi(start_index=206,end_index=215,k1=k1,step=stp,linear_compression_ratio=0.79)
print('\n'+filename_klp)
'get file named index1 index2 kl'
'get file named index1 index2 kl'
#step4
#loadDataToMysql
R"""
Note: the format of table_name='pin_hex_to_honeycomb_klt_2m'
|simu_index | HarmonicK | LinearCompressionRatio | kT |
Psi3Global | Psi6Global | RandomSeed |
"""
if not check:
import opertateOnMysql as osql
osql.loadTxtDataToMysql(path_to_file_name=filename_klp,table_name="pin_hex_to_honeycomb_klt_2m")#"/home/tplab/Downloads/193-205kl"
#step5
#watch kT limitation while melting
"""
import data_analysis_cycle as da
i=index1
while i<3566:
da.save_from_gsd(simu_index=i,seed=seed,final_cut=True,
bond_plot =True,
show_traps=False,
trap_filename="/home/"+account+"/hoomd-examples_0/testhoneycomb3-8-12",
trap_lcr=0.79,
account=account)
i+=1
"""
return end_index
def workflow_simu_to_mysql_pin_hex_to_honeycomb_rectangle1(index1,lcr,seed=9):#num
R"""
Parameters:
initial state: hex3-16-8 (12-6 in fact!)
traps:honeycomb3-8-12_rectangle1
safe lcr: [0.71,1.00]
Examples:
#scan seed
seed=0
while seed<9:
#pin sequence-GPU
index1=1843
lcr1=0.71#less than 0.71 is dangerous! some particles may not effected by trap!
while lcr1<0.905:
tt.workflow_simu_to_mysql_pin_hex_to_honeycomb_rectangle1(index1=index1,lcr=lcr1,seed=seed)
index1=index1+10
lcr1=lcr1+0.01
seed+=1
Example2:
#scan seed
seed=0
while seed<9.5:
#pin sequence-CPU
index1= 2463
lcr1=0.71#less than 0.71 is dangerous! some particles may not effected by trap!
while lcr1<0.805:
end_index = tt.workflow_simu_to_mysql_pin_hex_to_honeycomb_rectangle1(index1=index1,lcr=lcr1,seed=seed)
index1=end_index+1
lcr1=lcr1+0.01
seed+=1
"""
#set parameters
k1=1100.0
stp=100.0
kend=2000.0
#get simulation results
import symmetry_transformation_v2_9.symmetry_transformation_auto_honeycomb_rectangle1_pin as sa_hbp
end_index=sa_hbp.workflow(index1=index1,k1=k1,step=stp,k_end=kend,linear_compression_ratio=lcr,seed_set=seed)
'get file index123'
#get analyzed data
import data_analysis_cycle as da
filename_klp=da.saveIndexPsi3Psi6R(start_index=index1,end_index=end_index,k1=k1,step=stp,linear_compression_ratio=lcr,randomseed=seed)
#filename_kl=da.saveIndexPsi(start_index=206,end_index=215,k1=k1,step=stp,linear_compression_ratio=0.79)
print('\n'+filename_klp)
'get file named index1 index2 klp'
#loadDataToMysql
R"""
Note: the format of table_name='pin_hex_to_honeycomb_rectangle1'
simu_index | HarmonicK | LinearCompressionRatio | Psi3Global | Psi6Global | RandomSeed
"""
import opertateOnMysql as osql
osql.loadTxtDataToMysql\
(path_to_file_name=filename_klp,
table_name='pin_hex_to_honeycomb_rectangle1')#"/home/tplab/Downloads/193-205kl"
return end_index
def workflow_simu_to_mysql_depin_from_honeycomb_part(index1,lcr):
R"""
caution: the temperature kT=0.1 !!!
"""
#set parameters
k1=0.0
stp=10.0
kend=90.0
#get simulation results
import symmetry_transformation_v2_9.symmetry_transformation_auto_honeycomb_bidispersion_depin as sa_hb
end_index=index1+9#end_index=sa_hb.workflow(index1=index1,k1=k1,step=stp,k_end=kend,linear_compression_ratio=lcr)
'get file index123'
#get analyzed data
import data_analysis_cycle as da
filename_klp=da.saveIndexPsi3Psi6(start_index=index1,end_index=end_index,k1=k1,step=stp,linear_compression_ratio=lcr)
#filename_kl=da.saveIndexPsi(start_index=206,end_index=215,k1=k1,step=stp,linear_compression_ratio=0.79)
#print('\n'+filename_klp)
'get file named index1 index2 klp'
#loadDataToMysql
R"""
Note: the format of table_name='depin_from_honeycomb_part1_kt_01'
simu_index | HarmonicK | LinearCompressionRatio | Psi3Global | Psi3Ratio
"""
'''
prefix='/home/tplab/Downloads/'
start_index=index1
end_index=index1+30
filename_kl=prefix+str(start_index)+'-'+str(end_index)+'kl'
'''
import opertateOnMysql as osql
osql.loadTxtDataToMysql(path_to_file_name=filename_klp,table_name='depin_from_honeycomb_part1')#'depin_from_honeycomb_part1_kt_01'#"/home/tplab/Downloads/193-205kl"
def workflow_simu_to_mysql_pin_hex_to_honeycomb_part(index1,lcr,seed):
R"""
Examples1:
#scan seed
seed=0
while seed<9:
#pin sequence-GPU
index1=1343
lcr1=0.77#less than 0.75 is dangerous! some particles may not effected by trap!
while lcr1<0.845:
tt.workflow_simu_to_mysql_pin_hex_to_honeycomb_part(index1=index1,lcr=lcr1,seed=seed)
index1=index1+10
lcr1=lcr1+0.01
seed+=1
Examples2:
#scan seed
seed=0
while seed<9.5:
#pin sequence-GPU
index1=2413
lcr1=0.78#less than 0.75 is dangerous! some particles may not effected by trap!
while lcr1<0.825:
end_index=tt.workflow_simu_to_mysql_pin_hex_to_honeycomb_part(index1=index1,lcr=lcr1,seed=seed)
index1=end_index+1
lcr1=lcr1+0.01
seed+=1
Examples3:
seed=0
while seed<9:
#pin sequence-GPU
index1=3466
lcr1=0.81650#less than 0.75 is dangerous! some particles may not effected by trap!
tt.workflow_simu_to_mysql_pin_hex_to_honeycomb_part(index1=index1,lcr=lcr1,seed=seed)
seed=seed+1
"""
#set parameters
k1=100.0
stp=100.0
kend=1000.0
#get simulation results
import symmetry_transformation_v2_9.symmetry_transformation_auto_honeycomb_bidispersion_pin as sa_hbp
end_index=sa_hbp.workflow(index1=index1,k1=k1,step=stp,k_end=kend,linear_compression_ratio=lcr,seed_set=seed)
#end_index=index1+9
'get file index123'
#get analyzed data
import data_analysis_cycle as da
filename_klp=da.saveIndexPsi3Psi6R(start_index=index1,end_index=end_index,k1=k1,step=stp,linear_compression_ratio=lcr,randomseed=seed)
#filename_kl=da.saveIndexPsi(start_index=206,end_index=215,k1=k1,step=stp,linear_compression_ratio=0.79)
print('\n'+filename_klp)
'get file named index1 index2 klp'
#loadDataToMysql
R"""
Note: the format of table_name='hex_to_honeycomb_part1'
simu_index | HarmonicK | LinearCompressionRatio | Psi3Global | Psi6Global | RandomSeed |
"""
'''
prefix='/home/tplab/Downloads/'
start_index=index1
end_index=index1+30
filename_kl=prefix+str(start_index)+'-'+str(end_index)+'kl'
'''
import opertateOnMysql as osql
osql.loadTxtDataToMysql(path_to_file_name=filename_klp,table_name='pin_hex_to_honeycomb_part1')#"/home/tplab/Downloads/193-205kl"
return end_index
def workflow_simu_to_mysql_depin_from_honeycomb_part_oop_kT(index1,lcr,kT=1.0,seed=9,account='tplab'):#[x]
R"""
INTRODUCTION:
example4 :
seed=9
index1=4016
lcr1=0.816
kT=1.0
while kT<10.1:
index_end=tt.workflow_simu_to_mysql_depin_from_honeycomb_part_oop_kT(index1=index1,lcr=lcr1,kT=kT,seed=seed)
print(index_end)
print(kT)
index1 = index_end + 1
kT = kT + 1.0
"""
#step1
#pin check
R"""
import getDataAndScatter as scatt
scatt.showTrapsMap()
#traps:"testhoneycomb3-8-12"lcr=0.71
#particle:"testhoneycomb3-8-12"
"""
#step2
#set parameters
k1=100.0
stp=100.0
kend=1000.0
trap_name = "testhoneycomb3-8-12-part1"
#get simulation results
import symmetry_transformation_v2_9.pin_seed_oop as pin
wk = pin.workflow_uniform(index1,account,k1,stp,kend,lcr,kT,seed,trap_name)
wk.set_init_state_parameters(depin_from_honeycomb=True)
end_index = wk.workflow()
#end_index = index1 + 9
'get file index123'
#step3
#get analyzed data
import data_analysis_cycle as da
filename_kl=da.saveIndexklTPsi36Seed(start_index=index1,end_index=end_index,k1=k1,step=stp,linear_compression_ratio=lcr,kT=kT,randomseed=seed,account=account)
print('\n'+filename_kl)
'get file named index1 index2 klt'
#step4
#loadDataToMysql
R"""
Note: the format of table_name='depin_from_honeycomb_part_klt'
|simu_index|HarmonicK|LinearCompressionRatio|kT|
Psi3Global|Psi6Global|RandomSeed|
"""
import opertateOnMysql as osql
osql.loadTxtDataToMysql\
(path_to_file_name=filename_kl,
table_name='depin_from_honeycomb_part_klt')
#step5
#watch kT limitation while cooling
"""
import data_analysis_cycle as da
i=index1
while i<end_index+1:
da.save_from_gsd(simu_index=i,seed=seed,
coordination_number=True,
account=account)
i+=1
"""
return end_index
def workflow_simu_to_mysql_from_honeycomb_to_liquid(index1,lcr,kT=1.0,seed=9,account='tplab',check=False):#[x]
R"""
INTRODUCTION:
example4 :
import workflow_part as tt
import numpy as np
seed=9
index1=5390
lcr_list = np.linspace(0.82,1,10)
kT=1.0
for lcr1 in lcr_list:
tt.workflow_simu_to_mysql_from_honeycomb_to_liquid(index1=index1,lcr=lcr1,kT=kT,seed=seed,account='remote')#,check=True
print(index1,lcr1)
index1 = index1 + 1
"""
#step1
#pin check
R"""
import getDataAndScatter as scatt
scatt.showTrapsMap()
#traps:"testhoneycomb3-8-12"lcr=0.71
#particle:"testhoneycomb3-8-12"
"""
#step2
#set parameters
#trap_name = "testhoneycomb3-8-12-part1"
#get simulation results
import symmetry_transformation_v2_9.simple_simulation as ss
wk = ss.workflow_uniform(index1,account,lcr,kT,seed)
wk.set_init_state_parameters(a=3,nx=8,ny=12,depin_from_honeycomb=True)
#wk.__init_state_launch()
if not check:#index1>5399:#
pass#end_index = wk.workflow()
else:
end_index = index1
#end_index = index1 + 9
'get file index123'
#step3
#get analyzed data
if not check:#False:#
import data_analysis_cycle as da
filename_kl=da.saveIndexklTPsi36Seed(start_index=index1,end_index=index1+9,k1=0,step=0,linear_compression_ratio=lcr,kT=kT,randomseed=seed,account=account)
print('\n'+filename_kl)
'get file named index1 index2 klt'
#step4
#loadDataToMysql
R"""
Note: the format of table_name='depin_from_honeycomb_part_klt'
|simu_index|HarmonicK|LinearCompressionRatio|kT|
Psi3Global|Psi6Global|RandomSeed|
"""
"""
import opertateOnMysql as osql
osql.loadDataToMysql\
(path_to_file_name=filename_kl,
table_name='depin_from_honeycomb_part_klt')
"""
#step5
#watch kT limitation while cooling
"""
import data_analysis_cycle as da
i=index1
while i<end_index+1:
da.save_from_gsd(simu_index=i,seed=seed,
coordination_number=True,
account=account)
i+=1
"""
return end_index
def workflow_simu_to_mysql_pin_liquid_to_honeycomb_part(init_gsd_file,index1,lcr,kT=1.0,seed=9,account='tplab',check=False):#[x]
R"""
INTRODUCTION:
example:
import workflow_part as tt
init_gsd_file='/home/remote/hoomd-examples_0/trajectory_auto5409_9.gsd'
seed=9
index1=5410
lcr_list=list([0.79*7.44/3,0.8*7.44/3])
#lcr_list=lcr_list
kT=1.0
for lcr1 in lcr_list:
index_end=tt.workflow_simu_to_mysql_pin_liquid_to_honeycomb_part(init_gsd_file,index1=index1,lcr=lcr1,kT=kT,seed=seed,account='remote')#,check=True
#print(index1,lcr1)
index1 = index_end + 1
"""
#step1
#pin check
R"""
import getDataAndScatter as scatt
scatt.showTrapsMap()
#traps:"testhoneycomb3-8-12"lcr=0.71
#particle:"testhoneycomb3-8-12"
"""
#step2
#set parameters
k1=100.0
stp=100.0
kend=1000.0
trap_name = "testhoneycomb3-8-12-part1"
#get simulation results
import symmetry_transformation_v2_9.pin_seed_oop as pin
wk = pin.workflow_uniform(index1,account,k1,stp,kend,lcr,kT,seed,trap_name,"--mode=gpu")
wk.set_init_state_parameters(init_gsd=init_gsd_file)
if not check:#index1>5399:#
end_index = wk.workflow()
else:
end_index = index1 + 9
'get file index123'
#step3
#get analyzed data
if not check:#False:#
import data_analysis_cycle as da
filename_kl=da.saveIndexklTPsi36Seed(start_index=index1,end_index=end_index,k1=k1,step=stp,linear_compression_ratio=lcr,kT=kT,randomseed=seed,account=account)
print('\n'+filename_kl)
'get file named index1 index2 klt'
#step4
#loadDataToMysql
#step5
#watch kT limitation while cooling
return end_index
def workflow_simu_to_mysql_pin_hex_to_honeycomb_part_oop_klt_2m(index1,lcr,kT=1.0,seed=9,account='tplab',check=False):
R"""
INTRODUCTION:
example4 :
seed=9
index1=3806
lcr1=0.79
kT=0.0
while kT<1.01:
index_end=tt.workflow_simu_to_mysql_pin_hex_to_honeycomb_part_oop_kT(index1=index1,lcr=lcr1,kT=kT,seed=seed)
print(index1)
print(kT)
index1 = index_end + 1
kT = kT + 0.1
exp_mega:
index1=4271
lcr1=0.79
index_end=tt.workflow_simu_to_mysql_pin_hex_to_honeycomb_part_oop_kT(index1=index1,lcr=lcr1,account='remote')
exp_scan0.80-0.84:
index1=4286
lcr1=0.80
while lcr1<0.845:
index_end=tt.workflow_simu_to_mysql_pin_hex_to_honeycomb_part_oop_kT(index1=index1,lcr=lcr1,account='remote')
print(lcr1)
print(index1)
index1 = index_end+1
lcr1 = lcr1+0.01
exp_scan0.77-0.78:
index1=4336
lcr1=0.77
while lcr1<0.785:
index_end=tt.workflow_simu_to_mysql_pin_hex_to_honeycomb_part_oop_kT(index1=index1,lcr=lcr1,account='remote')
print(lcr1)
print(index1)
index1 = index_end+1
lcr1 = lcr1+0.01
exp low T:
import workflow_part as tt
seed=9
index1=5028
lcr1=0.77
while lcr1<0.845:
print(index1,lcr1,seed)
index_end=tt.workflow_simu_to_mysql_pin_hex_to_honeycomb_part_oop_klt_2m(index1=index1,lcr=lcr1,kT=0.1,seed=seed,account='remote')
index1 = index_end+1#index1 = index1+10#
lcr1 = lcr1+0.01
exp precise:
#pin sequence-GPU
import workflow_part as tt
import numpy
lcr_list = numpy.linspace(0.77,0.85,9)
lcr_list[-1] = 0.816
#print(lcr_list)
index1=5299
for lcr1 in lcr_list:
end_index = tt.workflow_simu_to_mysql_pin_hex_to_honeycomb_part_oop_klt_2m(index1=index1,lcr=lcr1,account='remote')
#print(index1,lcr1)
index1=end_index+1 #index1=index1+10 #
exp scan seed:
#0.77-0.78
import workflow_part as tt
for seed in range(9):
index1=4336
lcr1=0.77
while lcr1<0.785:
index_end=tt.workflow_simu_to_mysql_pin_hex_to_honeycomb_part_oop_klt_2m(index1=index1,lcr=lcr1,seed=seed,account='remote',check=True)
print(lcr1,index1,seed)
index1 = index_end+1
lcr1 = lcr1+0.01
#0.79-0.84,0.8165
import numpy
lcr_list = numpy.linspace(0.78,0.84,7)
lcr_list[0] = 0.79
lcr_list[1] = 0.8165
#print(lcr_list)
import workflow_part as tt
for seed in range(9):
index1=4266
for lcr1 in lcr_list:
index_end=tt.workflow_simu_to_mysql_pin_hex_to_honeycomb_part_oop_klt_2m(index1=index1,lcr=lcr1,seed=seed,
account='remote',check=True)
print(index1,lcr1,seed)
index1=index_end+1
"""
#step1
#pin check
R"""
import getDataAndScatter as scatt
scatt.showTrapsMap()
#traps:"testhoneycomb3-8-12"lcr=0.71
#particle:"testhex3-16-8"
#"check_init_pin_hex_to_honeycomb.png"
size_par < size_trap checked right!
"""
#step2
#set parameters
k1=100.0
stp=100.0
kend=1000.0
trap_name = "testhoneycomb3-8-12-part1"
#get simulation results
if not check:
import symmetry_transformation_v2_9.pin_seed_oop as pin
wk = pin.workflow_uniform(index1,account,k1,stp,kend,lcr,kT,seed,trap_name,mode="--mode=gpu")
end_index = wk.workflow()#period=1000;steps=2e6+1
else:
end_index = index1 + 9
'get file index123'
#step3
#get analyzed data
if not check:
import data_analysis_cycle as da
filename_kl=da.saveIndexklTPsi36Seed(start_index=index1,end_index=end_index,k1=k1,step=stp,linear_compression_ratio=lcr,kT=kT,randomseed=seed,account=account)
print('\n'+filename_kl)
'get file named index1 index2 klt'
#step4
#loadDataToMysql
R"""
Note: the format of table_name='pin_hex_to_honeycomb_part_klt_2m'
|SimuIndex|HarmonicK|LinearCompressionRatio|kT|
Psi3|Psi6|RandomSeed|
"""
if not check:
import opertateOnMysql as osql
osql.loadTxtDataToMysql\
(path_to_file_name=filename_kl,
table_name='pin_hex_to_honeycomb_part_klt_2m')
#step5
#watch kT limitation while cooling
"""
import data_analysis_cycle as da
i=index1
while i<end_index+1:
da.save_from_gsd(simu_index=i,seed=seed,
coordination_number=True,
account=account)
da.save_from_gsd(simu_index=i,seed=seed,final_cut=True,
bond_plot =True,
show_traps=True,
trap_filename="/home/tplab/hoomd-examples_0/testhoneycomb3-8-12-part1",
trap_lcr=lcr,
account='remote')
i+=1
"""
"""
import data_analysis_cycle as da
i=index1
while i<4271:
da.save_from_gsd(simu_index=i,seed=9,final_cut=True,
bond_plot =True,
show_traps=True,
trap_filename="/home/tplab/hoomd-examples_0/testhoneycomb3-8-12-part1",
trap_lcr=0.79,
account='remote')
i+=1
"""
return end_index
def workflow_simu_to_mysql_melt_from_honeycomb_part(index1,lcr,seed=9):
R"""
EXAMPLE:
seed=8
index1=3421#1369
lcr1=0.79
tt.workflow_simu_to_mysql_melt_from_honeycomb_part(index1,lcr1,seed)
"""
#step1
#pin check
R"""
import getDataAndScatter as scatt
scatt.showTrapsMap()
#traps:"testhoneycomb3-8-12-part1"lcr=0.79
#particle:"testhoneycomb3-6-12"lcr=0.79
#"check_init_melt_from_honeycomb_part.png"
size_par < size_trap checked right!
"""
#step2
#set parameters
kt1=1.0
stp=1.0
ktend=20.0
kset=700
#get simulation results
import symmetry_transformation_v2_9.symmetry_transformation_auto_honeycomb_bidispersion_melt_seed as sa_h
end_index=sa_h.workflow(index1=index1,kt1=kt1,step=stp,kt_end=ktend,linear_compression_ratio=lcr,kset=kset,seed_set=seed)
'get file index123'
#end_index=int(index1+19)
#step3[x]
#get analyzed data and generate txt table
import data_analysis_cycle as da
filename_kl=da.saveIndexkTPsi36Seed(start_index=index1,end_index=end_index,kt1=kt1,step=stp,
linear_compression_ratio=lcr,kset=kset,randomseed=seed)
#saveIndexCN4CN6SeedPsi6Seed
#filename_kl=da.saveIndexPsi(start_index=206,end_index=215,k1=k1,step=stp,linear_compression_ratio=0.79)
#print('\n'+filename_kl)
'get file named index1 index2 kl'
#step4
#loadDataToMysql
R"""
Note: the format of table_name='melt_from_honeycomb_part_test'
| simu_index | HarmonicK | LinearCompressionRatio | kT |
Psi3Global | Psi6Global | RandomSeed |
example:
create table melt_from_honeycomb_part_test(simu_index int unsigned not null,HarmonicK float,
LinearCompressionRatio float, kT float,Psi3Global float, Psi6Global float, RandomSeed int unsigned);
"""
import opertateOnMysql as osql
osql.loadTxtDataToMysql\
(path_to_file_name=filename_kl,
table_name='melt_from_honeycomb_part_test')
#step5
#watch kT limitation while melting
import data_analysis_cycle as da
i=3421
while i<3441:
da.save_from_gsd_seed(simu_index=i,seed=8,final_cut=True,
bond_plot =True,
show_traps=True,
trap_filename="/home/tplab/hoomd-examples_0/testhoneycomb3-8-12-part1",
trap_lcr=0.79)
i+=1
def workflow_simu_to_mysql_heat_treat_from_honeycomb_part():
R"""
Example:
tt.workflow_simu_to_mysql_heat_treat_from_honeycomb_part()
"""
#init
init_gsd = '/home/tplab/hoomd-examples_0/trajectory_auto34758.gsd'
lcr=0.81650
kset=1000
seed=8
#heating
index1_heat=3476
index_end_heat = workflow_simu_to_mysql_heat_from_honeycomb_part(init_gsd,index1_heat,lcr,kset,seed)
#cooling
init = index1_heat#3476
ends = 3481 #index_end_heat#3481
index1_cool=ends+1#3482
workflow_simu_to_mysql_cool_from_honeycomb_part(init,ends,index1_cool,lcr,kset,seed)
def workflow_simu_to_mysql_heat_from_honeycomb_part(init_gsd,index1,lcr,kset,seed=9):
R"""
EXAMPLE:
seed=8
index1=3441
lcr1=0.79
tt.workflow_simu_to_mysql_heat_from_honeycomb_part(index1,lcr1,seed)
"""
#step1
#pin check
R"""
import getDataAndScatter as scatt
scatt.showTrapsMap()
#traps:"testhoneycomb3-8-12-part1"lcr=0.79,0.80
#particle: 1369_8,2433_8
#"check_init_melt_from_honeycomb_part.png"
size_par < size_trap checked right!
"""
#step2
#set parameters
kt1=2.0
stp=1.0
ktend=7.0
#kset=1000#700
#init_gsd = '/home/tplab/hoomd-examples_0/trajectory_auto2433_8.gsd'#init_gsd='/home/tplab/hoomd-examples_0/trajectory_auto3365_9.gsd'
#get simulation results
import symmetry_transformation_v2_9.symmetry_transformation_auto_honeycomb_bidispersion_heat_seed as sa_k
end_index=sa_k.workflow(init_gsd,index1=index1,kt1=kt1,step=stp,kt_end=ktend,linear_compression_ratio=lcr,kset=kset,seed_set=seed)
'get file index123'
#end_index=int(index1+9)
#step3
#get analyzed data and generate txt table
import data_analysis_cycle as da
filename_kl=da.saveIndexkTPsi36Seed(start_index=index1,end_index=end_index,kt1=kt1,step=stp,
linear_compression_ratio=lcr,kset=kset,randomseed=seed)
'get file named index1 index2 kl'
#step4
#loadDataToMysql
R"""
Note: the format of table_name='melt_from_honeycomb_part_test'
| simu_index | HarmonicK | LinearCompressionRatio | kT |
Psi3Global | Psi6Global | RandomSeed |
"""
import opertateOnMysql as osql
osql.loadTxtDataToMysql\
(path_to_file_name=filename_kl,
table_name='melt_from_honeycomb_part_test')
#step5
#watch kT limitation while heating
import data_analysis_cycle as da
i=index1
while i<end_index+1:
da.save_from_gsd(simu_index=i,seed=seed,final_cut=True,
bond_plot =True,
show_traps=True,
trap_filename="/home/tplab/hoomd-examples_0/testhoneycomb3-8-12-part1",
trap_lcr=lcr)
i+=1
return end_index
def workflow_simu_to_mysql_cool_from_honeycomb_part(index_init,index_init_end,index1,lcr,kset,seed=9):
R"""
Introduction:
cool other systems(by index_init~end) into target systems(by index1~end).
Example:
init = 3454
ends = 3459
index1=3460
seed=8
tt.workflow_simu_to_mysql_cool_from_honeycomb_part(init,ends,index1,seed)
"""
#step1
#depin check
R"""
import getDataAndScatter as scatt
scatt.showTrapsMap()
#traps:"testhoneycomb_part3-11-6"
#particle:"testhoneycomb3-10-6"
#"check_init_depin_from_honeycomb_part.png"
size_par < size_trap checked right!
"""
#step2
#set parameters
#lcr=0.80
#kset=1100
#get simulation results
import symmetry_transformation_v2_9.symmetry_transformation_auto_honeycomb_bidispersion_cool_seed as sa_k
end_index=sa_k.workflow(index_init,index_init_end,index1,linear_compression_ratio=lcr,kset=kset,seed_set=seed)
'get file index123'
#end_index=int(index1+9)
#step3
#get analyzed data and generate txt table
import data_analysis_cycle as da
kt1=1.0
stp=1.0
filename_kl=da.saveIndexkTPsi36Seed(start_index=index1,end_index=end_index,kt1=kt1,step=stp,
linear_compression_ratio=lcr,kset=kset,randomseed=seed)
#saveIndexCN4CN6SeedPsi6Seed