You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sed -i "s/^ PROJECT.*/ PROJECT frame${frame_number}/"$new_inp
35
+
36
+
# Modify the CELL line, only replace between &SUBSYS and &COORD
37
+
sed -i "/&SUBSYS/,/&COORD/c\ &SUBSYS\n &CELL\n A ${lattice_a1}${lattice_a2}${lattice_a3}\n B ${lattice_b1}${lattice_b2}${lattice_b3}\n C ${lattice_c1}${lattice_c2}${lattice_c3}\n PERIODIC XYZ #Direction(s) of applied PBC (geometry aspect)\n &END CELL\n &COORD"$new_inp
38
+
39
+
# Clear the COORD content
40
+
sed -i '/&COORD/,/&END COORD/c\ &COORD\n &END COORD'$new_inp
41
+
42
+
# Read atom coordinates and write to the new input file
43
+
for((i=0; i<atom_count; i++));do
44
+
read -r atom_line
45
+
# Extract element symbol and coordinate information
0 commit comments