Code Monkey home page Code Monkey logo

schnax's People

Contributors

fabiannagel avatar sirmarcel avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

schnax's Issues

Return scalar energy?

Is there any particular reason we're returning the energy as (1,) shape array instead of scalar? I assume this is easier for testing, but it makes implementing forces awkward. Can I change this without causing too much trouble?

Faulty (?) imports in tests

Many tests currently contain lines like:

import tests.test_utils.initialize as init

which cause my test runner (nosetests) to fail with errors like:

ModuleNotFoundError: No module named 'tests'

My intention was for tests to be run by executing the test runner from within the tests/ directory. This is why the assets are addressed by relative paths, and why originally, imports directly from test_utils were used. Can we revert to this approach?

Break down model into representation and output

A schnax/SchNetPack model consists out of two main components:

  1. A SchNet representation block (embeddings, distance expansions, interactions)
  2. An atomwise output block (simple 2-layer MLP, aggregation)

This structure could be made clearer in the current implementation. Potential benefits:

  • Cleaner separation between representation and atomwise output configurations (see #3).
  • Usage of non-standard output blocks.
  • Prep for merging the SchNet representation to other repos.

Annoyingly, this would probably break weight mapping from pytorch to haiku.

Further simplify energy function with built-in init

Is it possible to automatically perform the haiku init call so we can return a clean neighbor_fn, energy_fn tuple in line with the usual jax-md approach? I would guess it's complicated because neighbors needs to be already initialised with something for this to work? Can we stub out out neighbors for this case with just a namedtuple?

Clean up statefulness

@hk.transform_with_state is only needed for testing to extract intermediaries. It'd be nice to have that functionality for testing without bloating production code by having to manage useless states.

Support multiple interaction layers

In principle, multiple interaction blocks are supported, but in practice, that is not exposed. We need to:

  • Amend the SchNet class to have a configurable number of interaction blocks
  • Amend the get_params method from the schnetkit helper to read the number of interactions from the spec dict and Do The Right Thing

Anything else?

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.