Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MALA for multiple elements #606

Draft
wants to merge 17 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
d145d55
Some small changes for the twoelement case
RandomDefaultUser Nov 15, 2024
ffe13c5
Bispectrum descriptor calculation for two elements in principle works
RandomDefaultUser Nov 15, 2024
a0ff258
Parallel processing works in principle
RandomDefaultUser Nov 19, 2024
7e4fb74
Merge remote-tracking branch 'refs/remotes/fork_lenz/develop' into mu…
RandomDefaultUser Nov 29, 2024
6b81953
Adapted bispectrum file to new internal nomenclature
RandomDefaultUser Nov 29, 2024
64956b8
Started implementing elemental weights
RandomDefaultUser Nov 29, 2024
62f3304
Added test for atoms to LAMMPS data
RandomDefaultUser Dec 2, 2024
240ca44
Made adjustable weights available
RandomDefaultUser Dec 2, 2024
a6ff4c3
Added runfiles for multielement Gaussian grid
RandomDefaultUser Dec 2, 2024
ace21a9
Atomic density formula working for two elements
RandomDefaultUser Dec 2, 2024
907e254
Three elements in principle work, but atomic density formula not for …
RandomDefaultUser Dec 2, 2024
8823bda
Testing some things
RandomDefaultUser Dec 5, 2024
27aa15d
Fixed parser to allow for sampling LDOS with over 1000 cube files
RandomDefaultUser Dec 9, 2024
5c08437
More testing
RandomDefaultUser Dec 10, 2024
c34a926
Merge branch 'refs/heads/large_ldos_sampling' into multielement_multidos
RandomDefaultUser Dec 10, 2024
f84dd75
Everything after second component was missing from structure factor c…
RandomDefaultUser Dec 13, 2024
9dd9a34
Atomic density formula for multiple elements works now
RandomDefaultUser Dec 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Parallel processing works in principle
  • Loading branch information
RandomDefaultUser committed Nov 19, 2024
commit a0ff2581eec248e4cb8187823ce23b60fdb4ec78
11 changes: 8 additions & 3 deletions mala/descriptors/bispectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,17 @@ def __calculate_lammps(self, outdir, **kwargs):
if self.parameters._configuration["mpi"]:
if self.parameters.use_z_splitting:
self.parameters.lammps_compute_file = os.path.join(
filepath, "in.bgridlocal.python"
filepath,
"in.bgridlocal_n{0}.python".format(
len(set(self.atoms.numbers))
),
)
else:
self.parameters.lammps_compute_file = os.path.join(
filepath, "in.bgridlocal_defaultproc.python"
filepath,
"in.bgridlocal_defaultproc_n{0}.python".format(
len(set(self.atoms.numbers))
),
)
else:
self.parameters.lammps_compute_file = os.path.join(
Expand All @@ -184,7 +190,6 @@ def __calculate_lammps(self, outdir, **kwargs):
len(set(self.atoms.numbers))
),
)

# Do the LAMMPS calculation and clean up.
lmp.file(self.parameters.lammps_compute_file)

Expand Down
41 changes: 41 additions & 0 deletions mala/descriptors/in.bgridlocal_defaultproc_n2.python
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Calculate bispectrum descriptors on a 3D grid

# pass in values ngridx, ngridy, ngridz, twojmax, rcutfac, atom_config_fname
# using command-line -var option

# Initialize simulation

units metal

read_data ${atom_config_fname}

mass * 1.0

# define grid compute and atom compute

group snapgroup type 1
variable rfac0 equal 0.99363
variable rmin0 equal 0
variable wj1 equal 1
variable wj2 equal 1
variable wj1local equal ${wj1}-1.0e-15 # inject a bit of fuzz
variable wj2local equal ${wj2}-1.0e-15 # inject a bit of fuzz
variable radelem1 equal 0.5
variable radelem2 equal 0.5
variable bzero equal 0
variable quadratic equal 0

compute bgridlocal all sna/grid/local grid ${ngridx} ${ngridy} ${ngridz} ${rcutfac} ${rfac0} ${twojmax} ${radelem1} ${radelem2} ${wj1local} ${wj2local} rmin0 ${rmin0} bzeroflag ${bzero} quadraticflag ${quadratic} switchflag ${switch}

# is this important? or does it just need to be big enough?

variable rcutneigh equal 2.0*${rcutfac}*${radelem1}

pair_style zero ${rcutneigh}
pair_coeff * *

# define output

thermo_modify norm yes

run 0
46 changes: 46 additions & 0 deletions mala/descriptors/in.bgridlocal_n2.python
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Calculate bispectrum descriptors on a 3D grid

# pass in values ngridx, ngridy, ngridz, twojmax, rcutfac, atom_config_fname
# using command-line -var option

# set up processor grid to match QE
${lammps_procs}

# Initialize simulation

units metal

read_data ${atom_config_fname}

mass * 1.0

# is this important? or does it just need to be big enough?

variable radelem1 equal 0.5
variable radelem2 equal 0.5
variable rcutneigh equal 2.0*${rcutfac}*${radelem1}

pair_style zero ${rcutneigh}
pair_coeff * *

# set up plane cutoff values to evenly distribute grid points

${zbal}

# define grid compute and atom compute

group snapgroup type 1 2
variable rfac0 equal 0.99363
variable rmin0 equal 0
variable wj1 equal 1
variable wj2 equal 1
variable wj1local equal ${wj1}-1.0e-15 # inject a bit of fuzz
variable wj2local equal ${wj2}-1.0e-15 # inject a bit of fuzz
variable bzero equal 0
variable quadratic equal 0

compute bgridlocal all sna/grid/local grid ${ngridx} ${ngridy} ${ngridz} ${rcutfac} ${rfac0} ${twojmax} ${radelem1} ${radelem2} ${wj1local} ${wj2local} rmin0 ${rmin0} bzeroflag ${bzero} quadraticflag ${quadratic} switchflag ${switch}

thermo_modify norm yes

run 0