cesmix-mit / lammps.jl Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Consider this line in fitting_snap.jl
:
include(joinpath(dirname(pathof(LAMMPS)), "..", "examples", "snap.jl"))
In my environment this tries to load from
/home/user/.julia/packages/LAMMPS/zlQdm/...
which I think is my "private" LAMMPS package? According to here.
I would like to load from my current directory instead of /home/user/.julia/...
- is there some command or path variable I need to change?
Alternatively, is there a proper Julia way to update /home/user/.julia/packages/LAMMPS/...
?
extract_variable_datatype is new in Nov2022 so that is newer than https://github.com/JuliaPackaging/Yggdrasil/blob/8145338aadf00a5c63c0c8b3921bd197c88cd60f/L/LAMMPS/build_tarballs.jl#L16
Requested by @joannajzou
Hi!, I have some questions about the LAMMPS script. In LAMMPS.jl/examples/snap.jl
the run_snap
function executes a script (using command
) that is necessary to subsequently obtain the bispectrum components. What is the minimum script needed to obtain the bispectrum components and their derivatives? Is all the information from the LAMMPS DATA files (LAMMPS.jl/examples/example_GaN_data/
) needed, or just the positions and types of atoms? Can we enter this information using a command instead of a file (DATA
)?
Thanks :)
@dallasfoster asked for this on Slack.
Two avenues that I see immediatly
pair_python
pair_python
seems to only support one Python potential at a time? We could potential support many Julia potentialsLAMMPS.jl
From a cursory research for #2 it seems that we would need to expose a custom
Pair class that takes raw function pointers and forwards the method implementations and then register that with PairCreatorMap
which is a map from string
to PairCreator
which is a typedef Pair *(*PairCreator)(LAMMPS *)
.
cc: @rohskopf
twojmax
is equals to 5 in examples/snap/snap.jl
, but it is equals to 2 in examples/snap/GaN.snapparam
. Is this correct?
We using zero-copy quite a lot, this means that memory is associated with LAMMPS unsafe_wrap
.
We need to look at all function and decide to document their unsafeness.
Are there any instructions here to run LAMMPS from Julia?
For example in Python we build LAMMPS as a shared library, and then link to Python.
What's the procedure with Julia?
I ask because when I try to run the snap.jl example, I get this error:
ERROR: LoadError: ArgumentError: Package LAMMPS not found in current path:
- Run `import Pkg; Pkg.add("LAMMPS")` to install the LAMMPS package.
Stacktrace:
[1] require(into::Module, mod::Symbol)
@ Base ./loading.jl:871
in expression starting at /home/drew/LAMMPS.jl/examples/snap/snap.jl:2
Asking for a new feature: an option to use a local lammps installation instead of artifacts.
For the time being, I am commenting out the following line in the api.jl file
import LAMMPS_jll: liblammps
and replace it with
liblammps = "/my/local/installation/lib64/liblammps.so"
As an example, CUDA.jl provides an option to use a local libraries instead of artifacts: https://juliagpu.gitlab.io/CUDA.jl/installation/overview/#Local-installation
using MPI
using MPIClusterManagers
using LAMMPS
MPI.Init()
manager = MPIClusterManagers.start_main_loop(MPI_TRANSPORT_ALL) # does not return on worker
cmds = [
"clear",
]
# do_n_tasks_in_parallel
function run_lammps(manager, cmds)
@mpi_do manager begin
LMP(["-screen", "none"], MPI.COMM_WORLD) do lmp
@test LAMMPS.version(lmp) >= 0
for cmd in cmds
command(lmp, cmd)
end
end
# data post-processing
end
end
Does anyone have some thoughts on a macro to wrap lammps input script lines with command(lmp,line)
, something along the lines of:
macro command(lmp,lines)
lmpcmds = quote
for l in $(lines)
command($(lmp),l)
end
end
return lmpcmds
end
In particular, say we already have an input script we want to use, so we read it in and wrap it with the macro and then add additional commands when that are needed.
This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml
to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix
on this issue.
I'll open a PR within a few hours, please be patient!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.