Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NNP needs for atom types of atoms in System #9

Open
bgobbi opened this issue Nov 16, 2018 · 6 comments
Open

NNP needs for atom types of atoms in System #9

bgobbi opened this issue Nov 16, 2018 · 6 comments

Comments

@bgobbi
Copy link

bgobbi commented Nov 16, 2018

Hi,
to implement a neural net potential (eg. ANI) as a force we need the atom types of the atoms in the system.
These are available from the Topology which is a Python based class.
My plan was to modify the constructor of NeuralNetworkForce adding a parameter vector<int> atomTypes than making it accessible through a function like getAtomTypes().

What would be the best way to support serialization in this case?

  • Storing one SerializationNode fore each atom?
  • Storing the topology file name instead and re-reading it doing a call-out from C++ to Python?
@peastman
Copy link
Member

There's nothing special about atom types. In more general terms, you're asking for the ability to include variables or placeholders in your graph, then define their values at runtime. That would be a convenient feature and worth adding. You don't really need it, though. Since those values are constant over the simulation, you can just embed them directly in the graph as constants.

@bgobbi
Copy link
Author

bgobbi commented Nov 16, 2018

That would require the graph to be recreated for each molecule.
If we go to a cuda based implementation then there is no graph file involved.

@peastman
Copy link
Member

If we go to a cuda based implementation then there is no graph file involved.

I'm not sure what you mean by that? This plugin is entirely based around a graph file. That's how you define the neural network.

@bgobbi
Copy link
Author

bgobbi commented Nov 16, 2018

I am trying to use the plugin code as the basis for working with the cuda based ANI code.

I think I can replace the graph file with a configuration file that.

@peastman
Copy link
Member

You can use the code for this plugin as a starting point for writing your own plugin, but ultimately it's going to be a totally different plugin. It wouldn't make any sense to add ANI specific features to this plugin. That isn't what it's for.

@bgobbi
Copy link
Author

bgobbi commented Nov 16, 2018

I agree!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants