Giter Club home page Giter Club logo

lammps.jl's People

Contributors

emmanuellujan avatar jrdegreeff avatar rohskopf avatar vchuravy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

lammps.jl's Issues

How to change path in `include` function?

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/...?

Minimum script needed to obtain the bispectrum components

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 :)

Support Julia function being called as a pari potential

@dallasfoster asked for this on Slack.

Two avenues that I see immediatly

  1. Mimic pair_python
  • Benefits:
    • Usable outside LAMMPS.jl
  • Downsides:
    • Requires linking LAMMPS against libjulia
  1. Enhance the LAMMPS API to make it possible to register a custom pair after loading the libraries
  • Benefits:
    • pair_python seems to only support one Python potential at a time? We could potential support many Julia potentials
    • Potential for better integration with LAMMPS.jl
    • Maybe lower overheads
  • Downsides:
    • Users need to use LAMMPS.jl
    • Unproven path

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 inconsistensy?

twojmax is equals to 5 in examples/snap/snap.jl, but it is equals to 2 in examples/snap/GaN.snapparam. Is this correct?

Handling of unsafe memory

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.

Running LAMMPS from Julia.

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

Provide an option to use a local lammps installation instead of artifacts

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

Add example using MPIClusterManager

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

Macro for wrapping input lines

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.

TagBot trigger issue

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.