Hello! I am inquiring about the manner in which someone who has installed LAMMPS via Conda can go about enabling packages in (supposedly) their LAMMPS binary. In my case I am trying to run the code I have pasted below. I have also pasted the error output to the best of my ability. I am having most concern about the line, “ERROR: Unrecognized fix style ‘brownian/sphere’ is part of the BROWNIAN package which is not enabled in this LAMMPS binary. (src/modify.cpp:908).” Here are my computer specifications:
LAMMPS version 2021.9.29; macOS Monterey (version 12.4); MacBook Pro (13-inch, 2019) (Processor is a 1.4 GHz Quad-Core Intel Core i5)
Any help would be greatly appreciated. Please respond whenever it is most convenient for you.
CODE
import math
from lammps import lammps
from random import randint
lmp = lammps()
#------------- Initialization
sigma = 1.0
box_length = 30
z_width = 0.25
boltzmann_const = 8.617333262 / 10**(5) #eV/K
eta = 0.1
movie_length = 1
timestep = 0.005
def number_formatting(x):
return format(x, ‘.14f’)
def increment():
value = 1
while True:
yield value
value += 1 #
def execute(block):
try:
print(block)
lmp.commands_string(block)
except Exception as e:
print(“LAMMPS failed with error:”, e)
ID = increment()
num_types = int(input(’\nNumber of particle types: ‘))
approx_num_particles = int(input(’\nApproximate Number of particles: '))
data = {}
for k in range(num_types):
data[k] = {}
data[k]["temperature"] = float(input(f'\nEffective temperature of particle #{k + 1} (K): '))
data[k]["radius"] = float(input(f'\nRadius of particle #{k + 1} (m): '))
sum_particles = 0
for k in range(num_types - 1):
eval = float(input(f'\nApproximate Percentage of particles of type #{k+1} (X %): ')) * approx_num_particles / 100
if eval % 1 < 0.5:
data[k]["particle count"] = math.floor(eval)
else:
data[k]["particle count"] = math.ceil(eval)
sum_particles = sum_particles + data[k]["particle count"]
data[num_types-1][“particle count”] = abs(approx_num_particles - sum_particles)
sum_particles = sum([data[k][“particle count”] for k in range(num_types)])
for k in range(num_types):
data[k][“percentage”] = data[k][“particle count”]/sum_particles
execute(f’’’
------------- Initialization
units lj
dimension 2
atom_style atomic
boundary f f p
pair_style lj/cut 1.123
pair_modify shift yes
------------- System definition
region testbox block -{box_length} {box_length} -{box_length} {box_length} -{z_width} {z_width}
create_box 2 testbox
‘’’)
for k in range(num_types):
execute(f’’‘group {k+1} region testbox’’’)
for k in range(num_types):
execute(f’’‘create_atoms {k+1} random {data[k][“particle count”]} {randint(100000, 999999)} testbox’’’)
for k in range(num_types):
execute(f’’‘fix {next(ID)} {k+1} brownian/sphere {data[k][“temperature”]} {randint(10000000, 99999999)} rng gaussian’’’)
for k in range(num_types):
execute(f’’‘fix {next(ID)} {k+1} viscous {3math.pieta2data[k][“radius”]}’’’)
for j in range(num_types):
for k in range(num_types):
if j < k:
order = f"{j+1} {k+1}"
else:
order = f"{k+1} {j+1}"
execute(
f’’’
pair_coeff {order} {number_formatting(boltzmann_const * 1/2 * (data[j][“temperature”]+data[k][“temperature”]))} {number_formatting(sigma)} {number_formatting(1.12246152962189*sigma)}’’’)
execute(
f’’’
timestep {timestep}
run 1
dump m0 all movie {movie_length} movie.m4v type type size 200 200
‘’’)
############ ERROR OUTPUT
LAMMPS (29 Sep 2021)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
using 1 OpenMP thread(s) per MPI task
Number of particle types: >? 2
Approximate Number of particles: >? 10000
Effective temperature of particle #1 (K): >? 200
Radius of particle #1 (m): >? 1
Effective temperature of particle #2 (K): >? 500
Radius of particle #2 (m): >? 1
Approximate Percentage of particles of type #1 (X %): >? 50
------------- Initialization
units lj
dimension 2
atom_style atomic
boundary f f p
pair_style lj/cut 1.123
pair_modify shift yes
------------- System definition
region testbox block -30 30 -30 30 -0.25 0.25
create_box 2 testbox
Created orthogonal box = (-30.000000 -30.000000 -0.25000000) to (30.000000 30.000000 0.25000000)
1 by 1 by 1 MPI processor grid
group 1 region testbox
0 atoms in group 1
group 2 region testbox
0 atoms in group 2
create_atoms 1 random 5000 695763 testbox
Created 5000 atoms
using lattice units in orthogonal box = (-30.000000 -30.000000 -0.25000000) to (30.000000 30.000000 0.25000000)
create_atoms CPU = 0.002 seconds
create_atoms 2 random 5000 445815 testbox
Created 5000 atoms
using lattice units in orthogonal box = (-30.000000 -30.000000 -0.25000000) to (30.000000 30.000000 0.25000000)
create_atoms CPU = 0.001 seconds
fix 1 1 brownian/sphere 200.0 69238573 rng gaussian
ERROR: Unrecognized fix style ‘brownian/sphere’ is part of the BROWNIAN package which is not enabled in this LAMMPS binary. (src/modify.cpp:908)
Last command: fix 1 1 brownian/sphere 200.0 69238573 rng gaussian
LAMMPS failed with error: ERROR: Unrecognized fix style ‘brownian/sphere’ is part of the BROWNIAN package which is not enable
fix 2 2 brownian/sphere 500.0 64559715 rng gaussian
ERROR: Unrecognized fix style ‘brownian/sphere’ is part of the BROWNIAN package which is not enabled in this LAMMPS binary. (src/modify.cpp:908)
Last command: fix 2 2 brownian/sphere 500.0 64559715 rng gaussian
LAMMPS failed with error: ERROR: Unrecognized fix style ‘brownian/sphere’ is part of the BROWNIAN package which is not enable
fix 3 1 viscous 1.8849555921538759
fix 4 2 viscous 1.8849555921538759
pair_coeff 1 1 0.01723466652400 1.00000000000000 1.12246152962189
pair_coeff 1 2 0.03016066641700 1.00000000000000 1.12246152962189
pair_coeff 1 2 0.03016066641700 1.00000000000000 1.12246152962189
pair_coeff 2 2 0.04308666631000 1.00000000000000 1.12246152962189
timestep 0.005
run 1
dump m0 all movie 1 movie.m4v type type size 200 200
ERROR: Not all per-type masses are set (src/atom.cpp:768)
Last command: run 1
LAMMPS failed with error: ERROR: Not all per-type masses are set (src/atom.cpp:768)
import sys; print('Python %s on s' (sys.version, sys.platform))