[lammps-users] some question on stretched nanotube

Dear all

I am trying to do MD simulation of nanotubes, I want to fix the low part and let up part move, a data file has been made for nanotubes structure information.
my “in” script is presented in the following. what I want to get is the force and displacement of up part of the nanotube.
because I used “fix setforce” in the up part, so someone told me that I can get the energy of the up part,then differential calculus , then there should be the force.
but the relationship of force and strain in the earlier part is not linear. what’s wrong about my codes???
the “data” is common data file for nanotube,so I only put my “in” script here.

in script

atom_style atomic
units metal
boundary f f f

read_data data.dat
mass 1 12

lattice sc 1
region 1 block INF INF INF INF INF 1
region 2 block INF INF INF INF 78 INF

group low region 1
group up region 2
group bound union low up
group mobile subtract all low up

pair_style tersoff
pair_coeff * * SiC.tersoff C

neighbor 0.3 bin
neigh_modify delay 5
timestep 0.001

output

thermo_style custom step temp etotal pxx pyy pzz
thermo_modify lost ignore flush yes
thermo 100
dump 1 all atom 1 cnt.lammpstrj
dump_modify 1 format “%7d %3d %10.5e %10.5e %10.5e” scale yes
dump 2 up custom 100 dump.myforce tag type fz
dump 3 up custom 100 dump.myposition tag z

temp controllers

fix 11 low setforce 0 0 0
fix 12 up setforce 0 0 0
fix 2 all nve
velocity low set 0 0 0
velocity up set 0 0 1
run 10000

What do you mean by energy of the up part? Your question
is too complex to answer easily. You need to express
the quantities you want in terms of something LAMMPS can
compute and output.

Steve