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
|
/*! @file inputs.h
* @brief Simulation input templates.
*/
/*! Template for an angle simulation. @see file_from_template */
static String angle_template[] = {
STRING_STATIC("#mode: angles"),
STRING_STATIC("log logfire_rANGOLO_t1.lammps"),
STRING_STATIC("units micro"),
STRING_STATIC("dimension 2"),
STRING_STATIC("atom_style bond"),
STRING_STATIC("bond_style harmonic"),
STRING_STATIC("boundary p p p"),
STRING_STATIC("read_data test.lmpdat"),
STRING_STATIC("bond_coeff 1 1e-7 5.8"),
STRING_STATIC("group interno type 1"),
STRING_STATIC("group bordo type 2"),
STRING_STATIC("compute Getx all property/atom x"),
STRING_STATIC("compute Gety all property/atom y"),
STRING_STATIC("variable c equal 2*PI/5.2 #a_pot"),
STRING_STATIC("#---------- definisco le G ----------- # 2pi/5 = 72 gradi , 10pi/5 = 2pi = 0."),
STRING_STATIC("variable G1_x equal ${c}*(cos(0)-cos(2*PI/5)) # i valori sono gli stessi per G1, G4, G5, G17"),
STRING_STATIC("variable G1_y equal ${c}*(sin(2*PI/5)-sin(0))"),
STRING_STATIC("variable G2_x equal ${c}*(cos(0)-cos(4*PI/5)) # idem per G2, +G3, G9, G13"),
STRING_STATIC("variable G2_y equal ${c}*(sin(4*PI/5)-sin(0))"),
STRING_STATIC("variable G6_x equal ${c}*(cos(2*PI/5)-cos(4*PI/5))"),
STRING_STATIC("variable G6_y equal ${c}*(sin(2*PI/5)-sin(4*PI/5)) # hanno anche Gy uguale G10,G16,G20"),
STRING_STATIC("variable G7_x equal ${G6_x}"),
STRING_STATIC("variable G7_y equal ${c}*(sin(2*PI/5)-sin(6*PI/5)) # Gx uguale al gruppo di G6, mentre"),
STRING_STATIC("variable G8_x equal 0.0 # Gx uguale G8 G18 G11 G15 #sarebbe 0"),
STRING_STATIC("variable G8_y equal ${c}*(sin(2*PI/5)-sin(8*PI/5)) # G8 e G18 sulle y"),
STRING_STATIC("variable G11_y equal ${c}*(sin(4*PI/5)-sin(6*PI/5)) # G11 e G15 sulle y"),
STRING_STATIC("variable V0 equal 1e-10"),
STRING_STATIC("variable pot_ext atom $(-2/25)*${V0}*(cos(${G1_x}*c_Getx+${G1_y}*c_Gety)+cos(${G1_x}*c_Getx-${G1_y}*c_Gety)&"),
STRING_STATIC("+cos(${G2_x}*c_Getx+${G2_y}*c_Gety)+cos(${G2_x}*c_Getx-${G2_y}*c_Gety)&"),
STRING_STATIC("+cos(${G6_x}*c_Getx+${G6_y}*c_Gety)+cos(${G6_x}*c_Getx-${G6_y}*c_Gety)&"),
STRING_STATIC("+cos(${G7_x}*c_Getx+${G7_y}*c_Gety)+cos(${G7_x}*c_Getx-${G7_y}*c_Gety)&"),
STRING_STATIC("+cos(${G8_y}*c_Gety)+cos(${G11_y}*c_Gety))"),
STRING_STATIC("variable Fx atom $(-2/25)*${V0}*(${G1_x}*(sin(${G1_x}*c_Getx+${G1_y}*c_Gety)+sin(${G1_x}*c_Getx-${G1_y}*c_Gety))&"),
STRING_STATIC("+${G2_x}*(sin(${G2_x}*c_Getx+${G2_y}*c_Gety)+sin(${G2_x}*c_Getx-${G2_y}*c_Gety))&"),
STRING_STATIC("+${G6_x}*(sin(${G6_x}*c_Getx+${G6_y}*c_Gety)+sin(${G6_x}*c_Getx-${G6_y}*c_Gety))&"),
STRING_STATIC("+${G7_x}*(sin(${G7_x}*c_Getx+${G7_y}*c_Gety)+sin(${G7_x}*c_Getx-${G7_y}*c_Gety)))"),
STRING_STATIC("variable Fy atom $(-2/25)*${V0}*(${G1_y}*(sin(${G1_x}*c_Getx+${G1_y}*c_Gety)-sin(${G1_x}*c_Getx-${G1_y}*c_Gety))&"),
STRING_STATIC("+${G2_y}*(sin(${G2_x}*c_Getx+${G2_y}*c_Gety)-sin(${G2_x}*c_Getx-${G2_y}*c_Gety))&"),
STRING_STATIC("+${G6_y}*(sin(${G6_x}*c_Getx+${G6_y}*c_Gety)-sin(${G6_x}*c_Getx-${G6_y}*c_Gety))&"),
STRING_STATIC("+${G7_y}*(sin(${G7_x}*c_Getx+${G7_y}*c_Gety)-sin(${G7_x}*c_Getx-${G7_y}*c_Gety))&"),
STRING_STATIC("+${G8_y}*sin(${G8_y}*c_Gety)+${G11_y}*sin(${G11_y}*c_Gety))"),
STRING_STATIC("### ------------ fix add force ------------------------------------------------------------- #"),
STRING_STATIC("timestep 500 #microsecondi"),
STRING_STATIC("displace_atoms all rotate 0.0 0.0 0.0 0.0 0.0 1.0 ANGOLO"),
STRING_STATIC("displace_atoms all move 0.0 0.0 0.0"),
STRING_STATIC("fix myForce interno addforce v_Fx v_Fy 0.0 energy v_pot_ext"),
STRING_STATIC("fix edgeForce bordo setforce 0.0 0.0 0.0"),
STRING_STATIC("fix_modify myForce energy yes"),
STRING_STATIC("compute pot_e all pe"),
STRING_STATIC("compute kin_e all ke"),
STRING_STATIC("compute bond_e all pe bond"),
STRING_STATIC("variable etot equal c_pot_e+c_kin_e"),
STRING_STATIC("#------- output for global values ----------- #"),
STRING_STATIC("thermo_style custom step c_pot_e c_bond_e c_kin_e v_etot"),
STRING_STATIC("thermo_modify format 2 %22.16g"),
STRING_STATIC("thermo_modify format 3 %22.16g"),
STRING_STATIC("thermo_modify format 5 %22.16g"),
STRING_STATIC("thermo 500"),
STRING_STATIC("<BEGIN_TRIES>"),
STRING_STATIC("variable Nstep equal 1"),
STRING_STATIC("# Dump compatible with ovito animations"),
STRING_STATIC("# dump 1 all custom 50 dump_rANGOLO_t${i} id type xs ys zs v_pot_ext"),
STRING_STATIC("# compute temperature interno temp/partial 1 1 0"),
STRING_STATIC("# fix 3 interno langevin 0.003 0.0 500 3548735 #ricorda di tenere un tempo di damping >> del timestep"),
STRING_STATIC("# fix 4 interno nve"),
STRING_STATIC("# fix_modify 3 temp temperature"),
STRING_STATIC("# run 50000"),
STRING_STATIC("variable forceTolerance equal 1e-12*${V0}"),
STRING_STATIC("<COOLING>"),
STRING_STATIC("min_style fire"),
STRING_STATIC("minimize 0.0 ${forceTolerance} 100000 100000"),
STRING_STATIC("<END_TRIES>"),
};
static size_t angle_template_len = sizeof(angle_template)/sizeof(angle_template[0]);
|