9
9
import os
10
10
import sys
11
11
12
+ import ase .io
12
13
import click
13
14
import numpy as np
14
- import ase .io
15
15
from aiida .common import NotExistent
16
16
from aiida .engine import run
17
17
from aiida .orm import Dict , SinglefileData , load_code
@@ -35,9 +35,21 @@ def example_dft_md_reftraj(cp2k_code):
35
35
)
36
36
37
37
# Trajectory.
38
- positions = np .array ([[[2 ,2 ,2.73 ],[2 ,2 ,2. ]],[[2 ,2 ,2.74 ],[2 ,2 ,2. ]],[[2 ,2 ,2.75 ],[2 ,2 ,2. ]]])
39
- cells = np .array ([[[4 ,0 ,0 ],[0 ,4 ,0 ],[0 ,0 ,4.75 ]],[[4.4 ,0 ,0 ],[0 ,4.2 ,0 ],[0 ,0 ,4.76 ]],[[4 ,0 ,0 ],[0 ,4.1 ,0 ],[0 ,0 ,4.75 ]]])
40
- symbols = ['H' ,'H' ]
38
+ positions = np .array (
39
+ [
40
+ [[2 , 2 , 2.73 ], [2 , 2 , 2.0 ]],
41
+ [[2 , 2 , 2.74 ], [2 , 2 , 2.0 ]],
42
+ [[2 , 2 , 2.75 ], [2 , 2 , 2.0 ]],
43
+ ]
44
+ )
45
+ cells = np .array (
46
+ [
47
+ [[4 , 0 , 0 ], [0 , 4 , 0 ], [0 , 0 , 4.75 ]],
48
+ [[4.4 , 0 , 0 ], [0 , 4.2 , 0 ], [0 , 0 , 4.76 ]],
49
+ [[4 , 0 , 0 ], [0 , 4.1 , 0 ], [0 , 0 , 4.75 ]],
50
+ ]
51
+ )
52
+ symbols = ["H" , "H" ]
41
53
trajectory = TrajectoryData ()
42
54
trajectory .set_trajectory (symbols , positions , cells = cells )
43
55
@@ -64,14 +76,14 @@ def example_dft_md_reftraj(cp2k_code):
64
76
"MD" : {
65
77
"ENSEMBLE" : "REFTRAJ" ,
66
78
"STEPS" : 3 ,
67
- "REFTRAJ" :{
68
- ' FIRST_SNAPSHOT' : 1 ,
69
- ' LAST_SNAPSHOT' : 3 ,
70
- ' EVAL_FORCES' : ' .TRUE.' ,
71
- ' TRAJ_FILE_NAME' : ' trajectory.xyz' ,
72
- ' CELL_FILE_NAME' : ' reftraj.cell' ,
73
- ' VARIABLE_VOLUME' : ' .TRUE.'
74
- },
79
+ "REFTRAJ" : {
80
+ " FIRST_SNAPSHOT" : 1 ,
81
+ " LAST_SNAPSHOT" : 3 ,
82
+ " EVAL_FORCES" : " .TRUE." ,
83
+ " TRAJ_FILE_NAME" : " trajectory.xyz" ,
84
+ " CELL_FILE_NAME" : " reftraj.cell" ,
85
+ " VARIABLE_VOLUME" : " .TRUE." ,
86
+ },
75
87
},
76
88
"PRINT" : {
77
89
"RESTART" : {
@@ -130,7 +142,7 @@ def example_dft_md_reftraj(cp2k_code):
130
142
},
131
143
],
132
144
},
133
- }
145
+ },
134
146
}
135
147
)
136
148
0 commit comments