I am using core-shell package to simulate nano indent of Strontium titanate. The simulation was layered, but when I calculated the temperature of one layer, the simulation was wrong. ERROR: Temperature compute degrees of freedom < 0 (src/CORESHELL/compute_temp_cs.cpp:251).
Some important commands are as follows:
units metal
dimension 3
boundary p p s
atom_style full
timestep 0.0001
neighbor 2.0 bin
neigh_modify every 1 delay 0
comm_modify vel yes
fix csinfo all property/atom i_CSID
read_data data.STO_cs.lmp fix csinfo NULL CS-Info
group cores type 1 2 3
group shells type 4 5 6
pair_style born/coul/wolf/cs 0.25 8 # A, rho, sigma, C, D
# A rho sigma C D
pair_coeff * * 0.0 1.000 0.00 0.00 0.00
pair_coeff 4 6 776.84 0.35867 0.00 0.0 0.00 #Sr-O
pair_coeff 5 6 877.20 0.38096 0.00 9.00 0.00 #Ti-O
pair_coeff 6 6 22764.3 0.1490 0.00 43.0 0.00 #O-O
bond_style class2
# R0 K2/2 K3 K4
bond_coeff 1 0.0 5.703 0.0 0 #Pb
bond_coeff 2 0.0 32987.0 0.0 0 #Ti
bond_coeff 3 0.0 9.205 0.0 0 #O
special_bonds coul 0.0 0.0 0.0
region fix_layer block INF INF INF INF INF 3.9 units box
region temp_layer block INF INF INF INF 4.0 8.0 units box
group fix_layer region fix_layer
group temp_layer region temp_layer
group newton_layer subtract all fix_layer temp_layer
thermo 100
#compute CSequ all temp/cs cores shells
compute CSequ temp_layer temp/cs cores shells
thermo_style custom step pe ke etotal temp
thermo_modify temp CSequ
min_style cg
minimize 1.0e-6 1.0e-6 10000 10000
That is because the groups “cores” and “shells” contain atoms outside of the “temp_layer” group.
You need to create a “cores_layer” and “shells_layer” groups that are the intersections of the “temp_layer” group and “cores” or “shells” groups, respectively, and use those. Then the error should go away.
Thanks for your reply. I have made some changes in my code, but it still fail to work. There is still the errors :
ERROR: Temperature compute degrees of freedom < 0 (src/CORESHELL/compute_temp_cs.cpp:251).
The following is the code that I changed:
units metal
dimension 3
boundary p p s
atom_style full
timestep 0.0001
neighbor 2.0 bin
#neigh_modify every 1 delay 0
comm_modify vel yes
fix csinfo all property/atom i_CSID
read_data data.STOsupercell.lmp fix csinfo NULL CS-Info
group cores type 1 2 3
group shells type 4 5 6
pair_style born/coul/wolf/cs 0.25 6 11 # A, rho, sigma, C, D
# A rho sigma C D
pair_coeff * * 0.0 1.000 0.00 0.00 0.00
pair_coeff 4 6 776.84 0.35867 0.00 0.0 0.00 #Sr-O
pair_coeff 5 6 877.20 0.38096 0.00 9.00 0.00 #Ti-O
pair_coeff 6 6 22764.3 0.1490 0.00 43.0 0.00 #O-O
bond_style class2
# R0 K2/2 K3 K4
bond_coeff 1 0.0 5.703 0.0 0 #Pb
bond_coeff 2 0.0 32987.0 0.0 0 #Ti
bond_coeff 3 0.0 9.205 0.0 0 #O
special_bonds coul 0.0 0.0 0.0
region fix_layer1 block INF INF INF INF INF 3 units box
region temp_layer1 block INF INF INF INF 3.9 11 units box
group fix_layer1 region fix_layer1
group temp_layer1 region temp_layer1
group fix_layer_cores intersect fix_layer1 cores
group fix_layer_shells intersect fix_layer1 shells
group fix_layer union fix_layer_cores fix_layer_shells
group temp_layer_cores intersect temp_layer1 cores
group temp_layer_shells intersect temp_layer1 shells
group temp_layer union temp_layer_cores temp_layer_shells
group newton_layer subtract all fix_layer temp_layer
thermo 1
#compute CSequ0 all temp/cs cores shells
compute CSequ temp_layer temp/cs cores shells
thermo_style custom step pe ke etotal temp
thermo_modify temp CSequ
min_style cg
minimize 1.0e-6 1.0e-6 10000 10000
You created a lot of groups, but didn’t update the failing command.
It is just logical that you get the same error.
P.S.: Please wrap quoted code in triple backquotes (```) so the typesetting of the forum software will show it as is and not interpret special characters as formatting directives. Without your input is not well readable (didn’t you see it?). I’ve done this for you now twice.
I am sorry that I haven’t wrapped quoted code in triple backquotes in the codes before.
Thank you so mush! I corrected the codes. Now it works successfully! Thanks for your reply.
The following is the codes:
units metal
dimension 3
boundary p p s
atom_style full
timestep 0.0001
neighbor 2.0 bin
comm_modify vel yes
fix csinfo all property/atom i_CSID
read_data data.STOsupercell.lmp fix csinfo NULL CS-Info
group cores type 1 2 3
group shells type 4 5 6
pair_style born/coul/wolf/cs 0.25 6 11 # A, rho, sigma, C, D
# A rho sigma C D
pair_coeff * * 0.0 1.000 0.00 0.00 0.00
pair_coeff 4 6 776.84 0.35867 0.00 0.0 0.00 #Sr-O
pair_coeff 5 6 877.20 0.38096 0.00 9.00 0.00 #Ti-O
pair_coeff 6 6 22764.3 0.1490 0.00 43.0 0.00 #O-O
bond_style class2
# R0 K2/2 K3 K4
bond_coeff 1 0.0 5.703 0.0 0 #Pb
bond_coeff 2 0.0 32987.0 0.0 0 #Ti
bond_coeff 3 0.0 9.205 0.0 0 #O
special_bonds coul 0.0 0.0 0.0
region fix_layer block INF INF INF INF INF 3 units box
region temp_layer block INF INF INF INF 3.9 11 units box
group fix_layer region fix_layer
group temp_layer region temp_layer
group temp_layer_cores intersect temp_layer cores
group temp_layer_shells intersect temp_layer shells
group newton_layer subtract all fix_layer temp_layer
thermo 1
compute CSequ temp_layer temp/cs temp_layer_cores temp_layer_shells
thermo_style custom step pe ke etotal temp
thermo_modify temp CSequ
min_style cg
minimize 1.0e-6 1.0e-6 10000 10000