simphony / simphony-lammps

The LAMMPS engine-wrapper for the SimPhoNy framework
http://www.simphony-project.eu/
BSD 2-Clause "Simplified" License
8 stars 0 forks source link

internal wrapper fails to add points on the margin of simulation box #89

Closed nathanfranklin closed 9 years ago

nathanfranklin commented 9 years ago

If the points listed below were added to the INTERNAL wrapper, the adding of some points (close or at the simulation box margin) fail.

script:

from simlammps import read_data_file
from simphony.core.cuba import CUBA
from simphony.engine import lammps

# define the wrapper to use.
wrapper = lammps.LammpsWrapper(use_internal_interface=True)

# define the CM component of the SimPhoNy application model:
wrapper.CM_extension[lammps.CUBAExtension.THERMODYNAMIC_ENSEMBLE] = "NVE"
wrapper.CM[CUBA.NUMBER_OF_TIME_STEPS] = 10
wrapper.CM[CUBA.TIME_STEP] = 0.005
# Define the BC component of the SimPhoNy application model:
wrapper.BC_extension[lammps.CUBAExtension.BOX_FACES] = ["periodic",
                                                        "fixed",
                                                        "periodic"]
for particles in read_data_file("restart_lammps_small.data"):
    data = particles.data
    data[CUBA.MATERIAL_TYPE] = 1
    particles.data = data
    wrapper.add_particles(particles)

wrapper.run()

lammps data file "restart_lammps_small.data"

LAMMPS data file via write_data, version 28 Jun 2014, timestep = 3000

9 atoms
3 atom types

0.0000000000000000e+00 3.4058196995269022e+01 xlo xhi
-7.6630943239355308e-03 7.6638606333679235e+01 ylo yhi
-8.5145492488172554e+00 8.5145492488172554e+00 zlo zhi

Masses

1 1
2 1
3 1

Pair Coeffs # lj/cut

1 1 1
2 1 1
3 1 1

Atoms # atomic

1 2 0.0000000000000000e+00 0.0000000000000000e+00 -8.5145492488172554e+00 0 0 0
2 2 8.5145492488172558e-01 8.5145492488172558e-01 -8.5145492488172554e+00 0 0 0
3 2 8.5145492488172558e-01 0.0000000000000000e+00 -7.6630943239355300e+00 0 0 0
4 2 0.0000000000000000e+00 8.5145492488172558e-01 -7.6630943239355300e+00 0 0 0
5 2 1.7029098497634512e+00 0.0000000000000000e+00 -8.5145492488172554e+00 0 0 0
6 2 2.5543647746451770e+00 8.5145492488172558e-01 -8.5145492488172554e+00 0 0 0
7 2 2.5543647746451770e+00 0.0000000000000000e+00 -7.6630943239355300e+00 0 0 0
8 2 1.7029098497634512e+00 8.5145492488172558e-01 -7.6630943239355300e+00 0 0 0
9 2 3.4058196995269023e+00 0.0000000000000000e+00 -8.5145492488172554e+00 0 0 0

Velocities

1 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
2 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
3 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
4 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
5 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
6 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
7 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
8 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
9 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00

lammps log

orthogonal box = (0 -0.00766309 -8.51455) to (34.0582 76.6386 8.51455)
change_box all x final 0.0000000000000000e+00 3.4058196995269022e+01 y final -7.6630943239355308e-03 7.6638606333679235e+01 z final -8.5145492488172554e+00 8.5145492488172554e+00

  orthogonal box = (0 -0.00766309 -8.51455) to (34.0582 76.6386 8.51455)
  orthogonal box = (0 -0.00766309 -8.51455) to (34.0582 76.6386 8.51455)
  orthogonal box = (0 -0.00766309 -8.51455) to (34.0582 76.6386 8.51455)
create_atoms 1 single 3.40581969953 0.0 -8.51454924882 units box
Created 0 atoms
create_atoms 1 single 2.55436477465 0.0 -7.66309432394 units box
Created 1 atoms
create_atoms 1 single 0.851454924882 0.851454924882 -8.51454924882 units box
Created 0 atoms
create_atoms 1 single 1.70290984976 0.0 -8.51454924882 units box
Created 0 atoms
create_atoms 1 single 1.70290984976 0.851454924882 -7.66309432394 units box
Created 1 atoms
create_atoms 1 single 0.851454924882 0.0 -7.66309432394 units box
Created 1 atoms
create_atoms 1 single 0.0 0.0 -8.51454924882 units box
Created 0 atoms
create_atoms 1 single 0.0 0.851454924882 -7.66309432394 units box
Created 1 atoms
create_atoms 1 single 2.55436477465 0.851454924882 -8.51454924882 units box
Created 0 atoms