Code Monkey home page Code Monkey logo

ipsuite's People

Contributors

m-r-schaefer avatar mrjulenergy avatar pre-commit-ci[bot] avatar pythonfz avatar robert-toews avatar tetracarbonylnickel avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

ipsuite's Issues

Changing data might not retrain a model

If you change AddData the ConfigurationSelection will rerun, but because the output is just a list of indices, e.g. [1, 2, 3] the UpdateAtoms might not be rerun automatically!

flowchart TD
        node1["AddData"]
        node2["ConfigurationSelection"]
        node3["UpdateAtoms"]
        node1-->node2
        node2-->node3
Loading

Model Analysis - force components

The ModelAnalysis Node only analyses the force magnitude. We should add a metric and plot for force components (all in one plot should be sufficient)

More advanced test cases

Some calculators, e.g. CP2K or XTB require a conda setup for tests.
Maybe we can parametrize and run these tests in a dedicated runner.

Improve Configuration Selection Interface

    test_data = []
    train_data = []
    test_data.append(
        ips.configuration_selection.RandomSelection(data=geopt, n_configurations=50)
    )

    train_data.append(
        ips.configuration_selection.RandomSelection(data=geopt, n_configurations=50, exclude=test_data)
    )

support something like this via:

        if self.exclude is not None:
            if self.exclude_configurations is None:
                self.exclude_configurations = {}
            if not isinstance(self.exclude, list):
                self.exclude = [self.exclude]
            for exclude in self.exclude:
                for key in exclude.selected_configurations:
                    if key in self.exclude_configurations:
                        self.exclude_configurations[key].extend(
                            exclude.selected_configurations[key]
                        )
                    else:
                        self.exclude_configurations[key] = exclude.selected_configurations[
                            key
                        ]

Create Benchmark Repositories

It should be easy to have a Benchmark Dataset, QM9, MD17, ... as a repository that one can clone and then work with.
Currently the limiting factor is ZnH5MD periodic pbc and chaning size of atoms.

check force error

forces are alreay per atom - check the analyseprediction node for force errors

UncertaintyCheck for MD

Have the following scheme:
MD with UncertaintyCheck starting from different configurations
UncertaintyCheck stops, then use ItemSelection(item=-1) and run DFT.
Retrain Model on all the data points

Repeat as often as you wish.

Use `self.value` and `__str__` for check classes

As discussed:

self.status = f"Temperature Check {temperature} < {self.max}"
# error
self.status = f"Temperature Check failed: last {temperature} > {self.max}"
# und dann
def __str__(self):
   return self.status 

Node Groups

We could provide Node Groups, that define multiple nodes together. E.g. metrics could be predict, metrics, force decomp all together.

Discussion: Furthermore, we don't really need PredictEithModel as it is basically Singlepoint where the calc is the model. Then we pass true/pred to the metrics node. This would probably make uncertainty easier as well, because we don't need the prediction class anymore. This would be easier with Node Groups.

Clean up Analysis Module

The IPS Analysis module starts to get really crowded.
Because these Nodes are some of the most important Nodes of IPS I think we should put them in some sort of order.

from ipsuite.analysis.bin_property import (
DipoleHistogram,
EnergyHistogram,
ForcesHistogram,
)
from ipsuite.analysis.ensemble import ModelEnsembleAnalysis
from ipsuite.analysis.model import (
AnalyseForceAngles,
AnalysePrediction,
BoxHeatUp,
BoxScaleAnalysis,
InterIntraForces,
PredictWithModel,
RattleAnalysis,
)
from ipsuite.analysis.sensitivity import (
AnalyseGlobalForceSensitivity,
AnalyseSingleForceSensitivity,
MoveSingleParticle,
)

It's also important to mention, if the Node location is changed inside IPS, the respective projects using these Nodes will have a changed cmd zntrack run ipsuite.analysis.PredictWithModel --name PredictWithModel in the dvc.yaml file and therefore, it will be recomputed.

I'm open for suggestions on how to organize these Nodes inside IPS.

Python implementation of packmol

Have a PyPack Node as a pure-Python drop-in replacement for the Packmol Node.

Maybe we can add http://m3g.iqm.unicamp.br/packmol/nmols.shtml to get a density approximate?

Mapping Node

Sometimes you want to run a ProcessSingleAtom for multiple configurations.
Currently this is very difficult so I'd propose:

method = ips.analysis.BoxScaleAnalysis(data=None)

with project:
   data = ips.AddData()
   volume_scan = ips.Map(data=data, method=method)

project.run()

Uncertainty Check

In addition to #81 or in general for all checks allow:

  • relative change: if e.g. the value is off by more then 50 % from a rolling mean, stop
  • relative change (outlier) take into account the fluctuations

Improve CP2K calculator

for atom in tqdm.tqdm(self.atoms):
atom.calc = calculator
atom.get_potential_energy()
ase.io.write(self.output_file.as_posix(), atom, append=True)
for file in self.cp2k_directory.glob("cp2k-RESTART.wfn*"):
# we don't need the restart files
file.unlink()

  • keep one wfn file and make it an attribute that can be used in other nodes
  • use ZnH5MD

MACE with params file

Instead of hard coding the inputs for mace create a yaml input file:

e.g. convert --hidden_irreps='128x0e + 128x1o' to

hidden_irreps: 128x0e + 128x1o

XTB does not work with nequip import

You can't import XTB

ImportError: xtb C extension unimportable, cannot use C-API

if nequip (and I guess torch) is imported.

-> We need lazy importing of modules

Atomic Energy Selection and Kernel Selection Methodologies Usage

Hello Maintainers,

I am working with a dataset of around 5000 molecular configurations, which are not necessarily generated through MD simulations. I am interested in employing the "Atomic Energy Selection" methodology, as outlined in this paper, to assemble a dataset for training my machine learning model.

In addition to this, the other methods available in this repository, such as the kernel selection method, seem to align well with my use-case requirements.

To better understand the implementation and to ensure I am utilizing these methodologies correctly, it would be greatly beneficial if you could provide an example code for the Atomic Energy Selection and Kernel Selection methodologies.

I have also spoken about this issue to Samuel Tovey via email.

StopGraphNode

We could add a Node, that on a condition, e.g. AL doesn't produce new configurations stops the graph by raising an Error.

Uniform Selection

  • add an option to bin and randomly select from bins instead of the current method
  • add uniform force selection

Add option to pass `true_data` seperatly

Would this be required in some scenarios?

class AnalyseProcessAtoms(zntrack.Node):
"""Analyse the output of a ProcessAtoms Node."""
data: ProcessAtoms = zntrack.zn.deps()
def get_data(self) -> typing.Tuple[list[ase.Atoms], list[ase.Atoms]]:
self.data.update_data() # otherwise, data might not be available
return self.data.data, self.data.atoms

Remove periodic key from SOAP

As mentioned in #104 the SOAP parameters currently contain the periodic key. This should not be a parameter but defined by the data.

ConfigurationSelection_1_kernel:
    soap:
        _type: soap_parameter_dataclass
        value:
            l_max: 7
            n_jobs: -1
            n_max: 7
            periodic: true
            r_cut: 9.0
            rbf: gto
            sigma: 1.0
            weighting: null

Make all nodes import from nodes

Make all nodes to be imported from ips.nodes.<name>

The can still be in their respective modules but use module overwrite and lazy loading.

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.