GithubHelp home page GithubHelp logo

latticevis.jl's Introduction

LatticeVis

Build Status Coverage Status codecov.io

Install the package with

Pkg.clone("git://github.com/ffreyer/LatticeVis.jl.git")

This package offers a way to create lattices from unit cells, that is a combination of basis positions and translation vectors. The dimensionality of the lattice can be choosen freely, as can the number of neighbor orders (i.e. first and second for 2).

A lattice can be created with Lattice(name_of_lattice, Ls=(Lx, Ly)), e.g. Lattice(honeycomb, Ls=(8, 6)). For this name_of_lattice has to be implemented as a ::UnitCell. Additional unit cells can be implemented fairly easily, see UnitCell.jl. They can also be passed by value, e.g. Lattice(honeycomb(), L=3).

A simple 2D plot can be generated with plot(lattice_object) where lattice_object is the Graph returned from Lattice.

l = Lattice(honeycomb)
plot(l)

Implemented 2D UnitCells:

  • square
  • triangle
  • honeycomb

Implemented 3D UnitCells

  • sc
  • bcc
  • fcc
  • diamond

Each UnitCell constructor can take the keyword arguments:

  • pos::Point{2, T} = Point{2}(0.): Starting position for this lattice.
  • a::T = 1.0: Scaling along the first lattice vector.
  • b::T = 1.0: Scaling along the second lattice vector.
  • isa::Symbol = :primitive: Lattice shape to use (:cubic or :primitive)

Lattice has the keyword arguments:

  • L::Int64 = 8: The size of the lattice
  • Ls::NTuple{D, Int64} = (L, ..., L): The size of the lattice in D dimensions.
  • do_periodic::Bool = true: Generate lattice with periodic bonds.
  • N_neighbors::Int64 = 1: The number neighbor levels used.
  • nodetype::Type{N} = StandardSite: Type of Node used to construct the lattice.
  • edgetype::Type{E} = StandardBond: Type of Edge used to construct the lattice.
  • graphtype::Type{G} = StandardGraph: Type of Graph used to construct the lattice.

where nodetype, edgetype and graphtype allow for custom nodes, edges and/or graph types to be used in the generation of a lattice. For this, the custom types must inherit from AbstractNode, AbstractEdge and AbstractGraph respectively, and implement fitting constructors. See LatticeGraph.jl.

latticevis.jl's People

Contributors

ffreyer avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

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.