profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/ExpHP/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Michael Lamparski ExpHP exphp.github.io Physics PhD and programming language enthusiast

ExpHP/lammps-sys 4

Rust bindgen wrapper (and static lib builder) for LAMMPS

ExpHP/band-dot 1

Band matcher via eigenvectors

ExpHP/funky 1

do you smell that?

ExpHP/newtype-ops 1

Rust operator-deriving macro for newtypes

colin-daniels/sp2 0

Computational condensed matter research code written in C++. Primary applications relate to low-dimensional carbon nanomaterials, phonons, and structural optimization.

ExpHP/android-rotate-trigger 0

Rotation on/off toggle for android

ExpHP/blog 0

github pages blog

ExpHP/brighter.vim 0

A "background=dark" version of the default "background=light" colorscheme

ExpHP/calc-tblg 0

old Haskell code for working with twisted bilayer graphene

ExpHP/crank 0

Crank Nicolson project

issue openedExpHP/thpages

struct viewer tracking list

  • Expanding
    • [ ] Indent offsets with expanded fields
    • [ ] Expand arrays
    • [ ] Expand things behind pointers
    • [ ] Save expanded set per struct name
    • [ ] Easy way to collapse all
  • Filters
    • [ ] Filtered name/version combos should still be allowed in the autocompletes as long as they are valid. (i.e. you should be able to follow a link to a

Tests

  • [ ] number of lines of text in OVERLAPPED

  • [ ] Expanding typedef

  • [ ] Reduce amount of loading

    • [ ] Keep DB around while navigating

Issues with current database:

  • [ ] Duplication of Direct3D types (should make a type library)
  • [ ] Bug with types like DWORD having 0 size in some common modules
  • [ ] Some types have bad size for alignment

created time in 2 days

issue openedExpHP/thpages

More semantic HTML

created time in 2 days

push eventExpHP/thpages

Michael Lamparski

commit sha e49d44355f0e64c23614a42b515509d961a187e3

add prototype of C Type parser

view details

Michael Lamparski

commit sha 00a4875c918b237c825828127a8bae3324d920bc

add selector components to struct viewer

view details

Michael Lamparski

commit sha 42a86d0f74c42202c073021e2c6fadb2b82c02fb

npm audit fix

view details

Michael Lamparski

commit sha 7797c81924b6bdaddc789c6ac3fc77b49d07b24b

use material-ui Autocomplete for selectors

view details

Michael Lamparski

commit sha e5419fb2471d7dc3051c2855e7e5758010de7bb8

install jest

view details

Michael Lamparski

commit sha 2e755143ebc9a325465c50af23c2fbb28b3c4ed0

some tests for Autocomplete

view details

Michael Lamparski

commit sha 08cbaeae9f3ede7d3e5b58250ea5c0b6fc4fcc2b

add selenium webdriver to package.json

view details

Michael Lamparski

commit sha 80453e6de61972309f21ded4fb958b0ac566c190

add webdriver-based style regression tests Unfortunately, getting them to run from WSL is a challenge. I had successfully set up VcXsrv and had a test running last night, only for windows update to reboot my computer as I slept and now it isn't working. :/

view details

Michael Lamparski

commit sha 777a17b3b483593d41cfba2cce7d47910fb3b8b8

link structs in struct viewer

view details

Michael Lamparski

commit sha 4167db73c1f75e7f2cfd2206d8f85687097e0494

fix tests now that I can run them

view details

Michael Lamparski

commit sha aa7ac411399ad2d7876b05356781fb10ca74380b

add type-tree validator, unused

view details

Michael Lamparski

commit sha 5175d32b659da9a563a7369e17fe6d23a7da1a8f

even better lazy parsers This actually undoes most of the changes in the previous commit by providing a more sensible API for recursive parsers that is implemented as a single function.

view details

Michael Lamparski

commit sha ea6ec40423e6132f4db61289d16965de6aa23d03

update struct database to v2

view details

Michael Lamparski

commit sha 2e3fa56708d180b4f0949ee64be2d8f7162165bf

fix some tests

view details

Michael Lamparski

commit sha 1668bd35e88fea82dc53387efda07ed1f4fd142a

another bugfix

view details

Michael Lamparski

commit sha 3458024efff375d4922463eb1a6d2f82d3b016cd

fix struct background once and for all

view details

Michael Lamparski

commit sha 58fa7c0b9fd39d3a27b96a387b8c230f5bfedcd4

fix missing struct name

view details

Michael Lamparski

commit sha 48a16dcba6648611faa03e1f2f07069075f49409

Render inline structs and unions

view details

Michael Lamparski

commit sha f859e189db9171ec015d7ca6de3012793bcdf153

render enums

view details

push time in 3 days

push eventExpHP/rsp2

Michael Lamparski

commit sha 4c713df179c4b0751fb29a9c4bb31c3742122f02

Correct docs of SupercellToken::center_cell I naively wrote that it breaks ties towards zero since it does floored division by 2, but if you actually think about it, for a dimension of 2 this will produce 1 and not 0.

view details

push time in 4 days

PullRequestReviewEvent

Pull request review commentExpHP/rsp2

Reax ff

-extern crate vergen;--use vergen::{ConstantsFlags, Result, Vergen};--fn main() {-    gen_constants().expect("Unable to generate vergen constants!");-}--fn gen_constants() -> Result<()> {-    let vergen = Vergen::new(ConstantsFlags::all())?;--    for (k, v) in vergen.build_info() {-        println!("cargo:rustc-env={}={}", k.name(), v);-    }--    Ok(())-}

Hmm I'll have to try and recall what the deal with this was, but I'd like to avoid just deleting this...

Brandonkl

comment created time in 4 days

PullRequestReviewEvent

Pull request review commentExpHP/rsp2

Reax ff

 mod cereal {          pub fn a() -> f64 { 1.0 }         pub fn vacuum_sep() -> f64 { 10.0 }-        pub fn layer_sep() -> Either<f64, Vec<f64>> { Either::A(1.0) }+        pub fn layer_sep() -> Either<f64, Vec<f64>> { Either::A(1.5) }

Try and see if adding layer-sep: 1.5 to your layers.yaml files works, rather than changing the default.

Brandonkl

comment created time in 4 days

Pull request review commentExpHP/rsp2

Reax ff

+This LAMMPS simulation made specific use of work described in the+following references.  See http://lammps.sandia.gov/cite.html+for details.++pair reax/c command:++@Article{Aktulga12,+ author = {H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama},+ title = {Parallel reactive molecular dynamics: Numerical methods and algorithmic techniques},+ journal = {Parallel Computing},+ year =    2012,+ volume =  38,+ pages =   {245--259}+}++fix qeq/reax command:++@Article{Aktulga12,+ author = {H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama},+ title = {Parallel reactive molecular dynamics: Numerical methods and algorithmic techniques},+ journal = {Parallel Computing},+ year =    2012,+ volume =  38,+ pages =   {245--259}+}+

Files like this which may be accidentally created could be added to .gitignore (a line with log.cite would do)

Brandonkl

comment created time in 4 days

Pull request review commentExpHP/rsp2

Reax ff

 pub struct RawAssemble {     /// This is to help catch bugs related to accidentally wrapping `carts_along_normal`     /// across a periodic boundary.     pub check_intralayer_distance: Option<f64>,+    pub atoms: Vec<Element>

same

Brandonkl

comment created time in 4 days

Pull request review commentExpHP/rsp2

Reax ff

 mod cereal {         // Number of unique images to generate along each layer lattice vector         #[serde(default = "defaults::layer::repeat")]         pub repeat: [u32; 2],+        pub site_atoms: Vec<String>,

Also I think "atoms" is vague. For a public interface like this I think the preferred name would be site-symbols. elements would also work.

Brandonkl

comment created time in 4 days

Pull request review commentExpHP/rsp2

Reax ff

 fn assemble_from_cereal(cereal: self::cereal::Root) -> FailResult<Assemble>             Lattice::new(&full_lattice),             CoordsKind::Carts(superstructure.to_carts()),         );+         // FIXME this reduction is just a bandaid for the above-mentioned issue.         //       (taking unique positions in the diagonal layer supercells and mapping         //        them into the cell that we generally use for the structure)         superstructure.reduce_positions();         fracs_in_plane.push(superstructure.to_fracs());++        for frac in 0..superstructure.num_atoms(){

In rsp2 I have been careful to make sure that all logic that depends on the order of atoms in a supercell goes through SupercellToken. The correct way to do this would be to change this line above it to save the SupercellToken to a variable sc:

let (superstructure, sc) = rsp2_structure::supercell::diagonal(layer.repeat).build(&structure);

and then instead of this loop, use the replicate method

atoms.extend(sc.replicate(&layer_atoms));

(In fact, I believe the current loop would actually be wrong; IIRC rsp2's supercells generate atoms in the order A A ... A A B B ... B B C C ... C C rather than A B C A B C ...! This did not affect you since your layers each have only one atom.)

Brandonkl

comment created time in 4 days

Pull request review commentExpHP/rsp2

Reax ff

 use crate::traits::{Load, AsPath, save::Json};  // Conversion factor phonopy uses to scale the eigenvalues to THz angular momentum. //    = sqrt(eV/amu)/angstrom/(2*pi)/THz-const SQRT_EIGENVALUE_TO_THZ: f64 = 15.6333043006705;+const SQRT_EIGENVALUE_TO_THZ: f64 = 15.6333043006705 * 0.208;

Yikes! We'll definitely need to figure out a better way to adjust this.

(also, you should document where the 0.208 comes from)

Brandonkl

comment created time in 4 days

Pull request review commentExpHP/rsp2

Reax ff

 fn add_scalables(         },          (-            &cfg::Scalable::UniformLayerSep { .. },-            &ScalableCoords::UnknownLayers { .. },-        ) | (-            &cfg::Scalable::LayerSeps { .. },+            &cfg::Scalable::UniformLayerSep { .. } | &cfg::Scalable::LayerSeps { .. },             &ScalableCoords::UnknownLayers { .. },         ) => bail!("cannot scale layer separations when layers have not been determined"), +        (+            &cfg::Scalable::UniformLayerSep { ref mask, .. } | &cfg::Scalable::LayerSeps { ref mask, .. },

hmmm I wonder why these changes are showing up here, did I not merge them into master?

Brandonkl

comment created time in 4 days

Pull request review commentExpHP/rsp2

Reax ff

 mod cereal {         // Number of unique images to generate along each layer lattice vector         #[serde(default = "defaults::layer::repeat")]         pub repeat: [u32; 2],+        pub site_atoms: Vec<String>,

If you make this Vec<Element> then you shouldn't need the conversion loop.

Brandonkl

comment created time in 4 days

Pull request review commentExpHP/rsp2

Reax ff

 pub const SITE_MAX_BONDS: usize = 4; #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, enum_map::Enum)] pub enum AtomType { Carbon, Hydrogen } impl AtomType {-    pub fn char(self) -> char {+    pub fn char(self) -> &'static str {

Oops! char definitely was a mistake here in hindsight, though I think I'd rather have this changed to pub fn element(self) -> Element. (and code that used to call .char() can call .element().symbol() instead)

Brandonkl

comment created time in 4 days

Pull request review commentExpHP/rsp2

Reax ff

 impl<P: Potential> Lammps<P>                 .collect::<Vec<_>>().join(" ")         }))?; -        lmp.commands(&[-            "units metal",                  // Angstroms, picoseconds, eV-            "neigh_modify delay 0",         // disable delay for a safer `run pre no`-            "atom_style atomic",            // attributes to store per-atom-            "thermo_modify lost error",     // don't let atoms disappear without telling us-            "atom_modify map array",        // store all positions in an array-            "atom_modify sort 0 0.0",       // don't reorder atoms during simulation-        ])?;+        if &(pair_style.to_string())[..17] == "pair_style reax/c"{
if pair_style.to_string().starts_with("pair_style reax/c") {

More importantly, however, rather than checking these things here, it would be preferrable to make it possible to handle these changes by adding methods to abstract over this to the rsp2_lammps_wrap::Potential trait. For now though, until we are certain what methods are needed, I am okay with this hack.

Brandonkl

comment created time in 4 days

Pull request review commentExpHP/rsp2

Reax ff

 pub struct Assemble {     /// between the first layer encountered on either side of the boundary)     pub vacuum_sep: f64,     layer_seps: Vec<f64>, // [layer] (length: nlayer - 1)+    pub atoms: Vec<Element>

On these internal types, I would call this elements for consistency with the rest of rsp2.

Brandonkl

comment created time in 4 days

Pull request review commentExpHP/rsp2

Reax ff

+# set environment for LAMMPS and msi2lmp executables+# to find potential and force field files+if ( "$?LAMMPS_POTENTIALS" == 0 ) setenv LAMMPS_POTENTIALS /home/brandon/.local/share/lammps/potentials+if ( "$?MSI2LMP_LIBRARY" == 0 ) setenv MSI2LMP_LIBRARY /home/brandon/.local/share/lammps/frc_files

Personal files such as these can be added to .git/info/exclude

Brandonkl

comment created time in 4 days

PullRequestReviewEvent
PullRequestReviewEvent

push eventexphp-share/th-re-data

Michael Lamparski

commit sha ec07fc44dca33ed3b57c843aed815bae020b0540

add common-modules to db-head.json

view details

push time in 6 days

push eventExpHP/dotfiles

Michael Lamparski

commit sha 56d3a79113ea0db257cdb3052208c8d36b1c7d49

add note to guard against future history mishaps

view details

push time in 6 days

push eventexphp-share/th-re-data

Michael Lamparski

commit sha a0fe6b93cf06e21a9bb86b7e32ea1ab515f905fc

add version-props.json

view details

push time in 8 days

create barnchexphp-share/th-re-data

branch : v2

created branch time in 8 days

push eventExpHP/dotfiles

Michael Lamparski

commit sha 25abc51e781490abdb9b343fbffb90dec3547b56

notes changes

view details

Michael Lamparski

commit sha 5cdf08559ba7d3c1165db4bb2faa014e5cc480a4

fix pyenv detection 'which pyenv' wasn't the right way to do it anyways, because the binary isn't even in PATH initially

view details

Michael Lamparski

commit sha 4190492d60d2679d6f5383e90da09a5f22a05811

disable mouse in fzf

view details

push time in 9 days

push eventExpHP/dotfiles

Michael Lamparski

commit sha c5e63fec2cda9dce6f867a51af1991b175f66baa

refactor prompt, work around pyenv perf nightmares

view details

push time in 9 days

push eventExpHP/dotfiles

Michael Lamparski

commit sha d5e125fb8169414f8035063cba3fd35d9c140287

wsl display

view details

push time in 9 days

push eventExpHP/dotfiles

Michael Lamparski

commit sha 73301fe558df17dcf52172119ad2739cd9982ba4

pyenv stuff

view details

push time in 9 days

push eventexphp-share/pyputil

Michael Lamparski

commit sha 703ad4860e1c661b838a97dc83ad562c43e50a85

add 2-file freqs/evecs input

view details

push time in 9 days