read_restart

Dear lammps users,

I have two questions:
1、I simulate nanopillar compression and write a restart file after relaxing, then one input file perform compression after relaxing and another starts from the relaxed configuration by using read_restart command, strangely, the first one runs well but the second one stretch the nanopillar instead of compressing it, the two scripts are the same in the deformation part, so what can be wrong?
2、I want to add a new pair_style, say myeam by modifying the current .cpp file, then what steps should I take to compile and run it so it can be recognized by LAMMPS? I tried “g++ pair_myeam.cpp -o myeam”, but it seemed to lack many files when compiling.

Thank you in advance!

Best wishes,
Michelle

Your first Q is of the form, I ran a simulation with a script and it

doesn’t work, what could be wrong? No one can tell with that limited

of info.

For your 2nd Q, see doc/Section_modify.html. It explains how

to add a pair style.

Steve

Thank you so much for replying my e-mail!
For my first Q, my model is a pristine single crystal Al nanopillars with a length-to-diameter ratio of 2:1, at first, the energy was minimized, then the arrangement was relaxed for 10000 time steps at 10 K. After that, uniaxial compression was performed by imposing compressive displacements to atoms along the z-direction that varied linearly from zero at the bottom to a maximum value at the top layers. the simulation was performed in constant NVT ensemble.
I wrote restart file after relaxing and when I used the relaxed configuration to perform compression directly, the result was tensile! Other parts were the same. I attached the two input script, you can test them.
For my second Q, I compile on linux system, and when I “make” in src folder without any change, why can’t I get .o file?

in.Al (1.98 KB)

restart.Al (1.43 KB)

Al_zhou.eam.alloy (723 KB)