[lammps-users] (no subject)

Hello,
I'm am trying to open a "restart" file in order to apply a displacement to the top region of a cylinder, filled with a chain of spherical atoms.
When compiling, i get a segmentation fault. I am new to lammps and can't seem to find a solution.
Thank you for your help.
Sincerely.
Loic Courtois
Input file
"communicate single vel yes
dimension			3
units				lj
boundary			s s s
atom_style			hybrid angle granular
neighbor			0.3 nsq
newton				off on
read_restart			restart.min

#Potentiels
pair_style			gran/hertz/history 200000.0 NULL 50.0 NULL 0.5 1
pair_coeff			* *

bond_style			fene
bond_coeff 			* 100.0 1.5 1.0 1.0 
special_bonds			fene dihedral no
angle_style			harmonic
angle_coeff			* 100.0 180.0

region				top cylinder z 5 5 5 99 101 vel 0 0 -0,1 units box
group				grip region top
fix 				cstvel1 grip setforce 0 0 0
fix				nve_all all nve
run				0000"

I get the following log and error:
"LAMMPS (7 Apr 2010)
Reading restart file ...
WARNING: Restart file version does not match LAMMPS version
  restart file = 20 Feb 2010, LAMMPS = 7 Apr 2010
WARNING: Restart file used different newton pair setting, using input script value
  orthogonal box = (-12.914 -13.2111 -2.76995) to (12.5382 12.3759 101.599)
  1 by 1 by 1 processor grid
  38533 atoms
  999 bonds
  998 angles
Finding 1-2 1-3 1-4 neighbors ...
  2 = max # of 1-2 neighbors
  2 = max # of 1-3 neighbors
  4 = max # of 1-4 neighbors
  6 = max # of special neighbors
Finding 1-2 1-3 1-4 neighbors ...
  2 = max # of 1-2 neighbors
  2 = max # of special neighbors
89 atoms in group grip
Segmentation fault"

Can you post the restart file? It's possible the syntax
of the restart file changed inbetween the 2 versions,
but it looks like you are getting past that. One safe thing
to do is convert your restart file to a data file (using
the Feb tools/restart2data.cpp file), then read
the data file.

Steve

3 errors:

a) your restart file has an atom style of angle (no granular) -
this should throw an error when you try to use pair_style granular,
but LAMMPS wasn't resetting a flag that would print the error
when the restart file wiped out your hybrid atom style

b) LAMMPS wasn't expecting you to use a time-dependent region
before a run started, so a value was un-initialized

c) your z velocity has a comma in it, not a ".", so LAMMPS will
likely read it as 0

a+b were bugs which I've now fixed - I'll post a patch later today

Note that you cannot do what you want to do, which is take a non-granular
restart file and convert it into a granular simulation. You cannot
use the atom_style command after read_restart. And using it before,
it will just be wiped out by the read restart. More fundamentally, the
atoms in your restart file don't have radii, which atom_style granular
requires. The only solution is to convert your restart file to a data
file, and reformat it for a granular model, i.e. add a diameter to each atom.

Steve

First, thank you for pointing out those different errors.

Then, the reason why i am using a non-granular restart file is because it is coming from a minimization step (using minimize) that can not be done with granular potentials. And since i need this granular potential in my simulation, i thought i would just specify it after reading the restart file. So if i understand correctly, this is where the probleme was coming from.

Would it be possible to perform a minimization step taking into account granular potentiel, with a correct data file (atom diameter, etc…)?

Thank you again.
Loic

Then, the reason why i am using a non-granular restart file is because it is coming from a minimization step (using minimize) >that can not be done with granular potentials. And since i need this granular potential in my simulation, i thought i would just >specify it after reading the restart file. So if i understand correctly, this is where the probleme was coming from.

As I said earlier, you can't switch atom styles, because the
quantities that atom_style granular require
are not defined for your system.

Would it be possible to perform a minimization step taking into account granular potentiel, with a correct data file (atom diameter, >etc...)?

Granular potentials are frictional (normal and tangential) and not
conservative forces, so you can't
do a valid minimize with them. You might be able to get particles to push off
each other, but I haven't tried. You could also do that with other
potentials, e.g. pair soft.

Steve