Giter VIP home page Giter VIP logo

crystal-packing's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar malramsay64 avatar

Watchers

 avatar  avatar

crystal-packing's Issues

Minimise configurations before starting long MC

There should be an initial step which generates the starting configurations for each MC minimisation. This step should be straightforward and do a good job of sampling the space.

One idea is to do an initial minimisation with a large step size, to get close to the optimal packing, followed by the longer simulation with larger steps.

Use a proper calculation of energy

Rather than the number I have now, which is purely indicative. I should have a value of the free energy. This likely will have to be negated as a result but that is workable.

This will require some additional thought on #2 for getting reproducible results.

Ensure state is returned

The best state should always be returned from the optimisation, with the initial state
checked to ensure it is valid before continuing.

Return iterators rather than vectors

Rather than collecting a vector which is then iterated over, I should just return the
iterators. This should be possible using the impl Trait syntax.

Only show a single periodic unit cell

Rather than displaying up to 2 unit cells surrounding the original, the visualisations should only include a single surrounding unit cell.

This may require re-working the periodic boundary code to accept a parameter taking the number of periodic images to return

Favour simpler unit cells

The output of this configuration should be the simplest unit cell possible. It is
probably not possible to provably do this, however a best effort attempt to simplify the
generated configurations is a good idea.

One part of the simplification would be to limit the degrees of freedom available to the
cell. This approach is similar to how the wyckoff sites with symmetry elements help,
they reduce the degrees of freedom and will result in a simpler configuration.

There is also the approach of giving a small weight to a simpler configuration,
particularly at the start of the simulation which would help bias a simpler unit cell,
although there is the issue that this may bias the configuration away from the best
score.

Have a good method for scaling scores or acceptance

There is currently only a single acceptance algorithm for all the different types of
scores. This is an issue in that for the acceptance criteria to work properly there
needs to be a good choice of score or a good choice of the 'temperature' for the
acceptance. This means either a good method of controlling it, values which work for a
large range or something similar.

Handle fixed position and orientation

The alternative wyckoff sites with higher symmetry, require that the position in at least one axis is fixed as well as the orientation.

The simulation should handle fixing these parameters.

Calculate energy to a distance cutoff

This would use a distance cutoff for the energy calculations, with any particle further
away than a specified distance not being counted. This is similar to the Shifted Lennard Jones
potential and this may need to be implemented to avoid instabilities.

Create README file

The README should include at least

  • Installation instructions
  • Useage/getting started guide
  • Description of project

Visualisation show intersections not being calculated correctly

I don't know exactly where the error lies, whether it is in the code for the
intersection or the visualisation, however there is a disconnect between
what the code thinks is intersecting and what the visualisations display as
intersecting.

This is particularly troublesome for the transformations with either glide planes or
mirrors. The p2 crystal appears to be fine, however the p2gg or the pg don't have the
same issues.

Use Shunting-yard algorithm for generating transforms

The (shunting-yard)[https://en.wikipedia.org/wiki/Shunting-yard_algorithm) algorithm is a general method of calculating a mathematical expression from a text input. This would handle the general case much better.

There are a number of implementations in rust

I will need some modifications to this algorithm since I am using it to fill values in a matrix so I don't think using an external crate is the solution.

Document unsafe block

There should be a clear indication of why the unsafe block is used, and under what conditions I am ensuring that the code is safe. This should include the assumptions I have made.

Additionally I have added the send and sync traits to the unsafe code, so these should also be explained and if possible removed.

Use matrix definition of transform

Rather than using the definition which I currently have, which is proving to be
problematic and complicated. It is likely much simpler to just use a transformation
matrix of size N+1 where N is the dimension of the transform.

I am creating a matrix anyway so there is no real change to the input, mostly the change
will be accessing the values and how they change.

Reduce space of optimisation

I want to work to reduce the amount of space the monte carlo algorithm searches by removing degenerate configurations. I am not entirely sure if all of these will work or reduce the space too much.

  • cell xlen >= ylen, by only allowing a single orientation
  • Particle x,y <= 0.5, positions in the bottom left hand corner helps with symmetry. Might need to be 1/N where N is the number of wyckoff sites.

These choices will need to be well documented and explained

Support non-general wyckoff sites

This would require that the molecule is placed in the site with some additional constraints. Initially starting simple is the best path forward for this.

Deterministic Simulations

With the same configurations the simulations should give exactly the same result.

This is simply a case of setting the seed of the random number generator for each
optimisation from the index.

Randomise orientations on initialisation

All particles are initially oriented the same direction, which doesn't result in a particularly wide range of configurations. There should be some way to initialise the orientation, whether randomly or procedurally such that this space is explored better.

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.