Replies: 3 comments
-
Hi Jim,
This is definitely possible but it requires some modifications. We now have
two major versions of Deep Potential, the original one and the DeepPot-SE
version. Which one would you like to work on? Let me answer your questions
in more details after hearing more from you.
Besides reducing the number of inputs, you may also consider reducing the
number of atomic net. For example, when we consider a molecular system like
water, maybe the construction could be the summation of atomic energies of
only oxygen. This may have some limitations and we did not do any tests,
but it will definitely reduce computational cost if it works.
Best,
Linfeng
…On Sun, Feb 24, 2019 at 12:32 PM Jimbo994 ***@***.***> wrote:
Dear DeePMD developers,
My name is Jim, I am a Msc chemistry student at the University of
Amsterdam. I am currently doing my master research internship on the topic
Neural network potentials.
I have read the DeePMD papers and installed your packages and I think it
is really exciting stuff. However, I would like to test some things out but
I am not sure how to do this.
I want to be able to take only certain "interactions" into account. With
that I mean the following: say that I have a system containing water
molecules, Now I want oxygen atoms to only feel hydrogen atoms instead of
feeling both hydrogen atoms and oxygen atoms. The way I was thinking of
achieving this is by adjusting the way the Dij matrix is created.
I want to be able to specify what atoms I want in the neighbour list, so
say that I am looking at an oxygen atom, then I want its neighbour list or
Dij matrix only to contain hydrogen atoms. In this way, I am forcing the
oxygen atom to only feel the hydrogen atoms.
In this way, it would hopefully be possible to reduce computational cost
but still obtain reliable force fields. Would this be possible to do by
making adjustments to your code?
Many thanks in advance,
Jim Boelrijk
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://github.com/deepmodeling/deepmd-kit/issues/18>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ARPhi9WVRcuwBlczm68RWWlO8pwkW61lks5vQsysgaJpZM4bOp_g>
.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi Linfeng, Thanks for your reply. I have no preference for the version of DeepMD kit as long as I am able to perform the required tasks. Can you please suggest me the required modifications in case of water for
I do understand that probably this will not be good enough to do dynamics but I think it's a nice and easy test for the computational cost. Many thanks in advance, Jim |
Beta Was this translation helpful? Give feedback.
0 replies
-
Dear Jim,
Sorry for this late reply.
See below for my answers. In the following, I assume that you will do a
quick check of proof of concept, which could be realized by modifying a bit
the python code. However, if the proof of concept works, there should be
some additional modifications to make the code even more efficient. I will
these modifications later in this response. Let us assume that we are
looking at version 0.12.0 or later versions.
Modifications for proof of concept:
1. 1. Reducing the number of inputs(so only consider O-O and not O-H
for atomic net of O)
1. 2. Reducing the number of atomic net(summation of atomic energies
of only oxygen )
In source/train/Model.py, the function build_atom_net(), you will see the
loop for type_i in range(self.ntypes):. you will see that we use tf.slice()
to cut the input for the atomic net corresponding to type_i. Therefore, you
should be able to reduce the number of atomic net if you add an if sentence
here so that you only construct atomic nets for the type that you choose.
This answers your question 2.
If we go on, let us say, you want to reduce the number of inputs for your
question 1, you will probabily need to modify the function _DS_layer, in
which you will still use tf.slice() to select inputs corresponding to
different type of neighbors. You could remove the types that you do not
want.
I would think that the model might work well if you do the modification
corresponing to your question 2, because this could correspond to a
different energy partitioning scheme. However, for the modification
corresponding to your question 1, I think the neighboring environment will
become non-unique, and the model might not perform well. For example, in
that case, given the same set of oxygen position, there could be different
arrangement of hydrogen positions that give rise to very different forces.
Anyway, that's only my guess and you may test it.
1. 3. Training only on energies(so probably have to do batch
normalisation, is it possible in DeepMD)
1. 4. Change activation functions as ReLU gave better results while
training only on energies in the original Deep potential archive paper.
In the json file for training, setting pref_f and pref_v to 0 will allow
you to tran with only energies. To allow for batch normalization (BN),
please search useBN in source/train/Model.py, you will see that we have
some code for BN but we manually set it to false. This is because that
later we found it less useful. In any case, if you want to modify the
network structure or activation function, please refer to the
functions _one_layer()
and build_atom_net() in source/train/Model.py. In particular, if you want
to change tanh to ReLU, the parameter activation_fn is what you should look
for. I would not suggest using ReLU because later we relized that it will
make the forces discontinous.
Additional modifications to make the code even more efficient:
In source/train/Model.py, from the function build_interaction() we know
that the input for build_atom_net() is from the function
op_module.descrpt_norot for the smooth version or the op_module.descrpt for
the discontineous version. This is indeed implemented in
source/lib/include/ComputeDescriptor.h, for which you really need to read
and change in details. After that, you should go to the folder source/op,
in which you need to make the definition of ops and their gradients
(descript.cc, prod_force, prod_virial, etc.) consistent. Please read
source/op/readme for more details. This would be extremely tedious so I
would suggest that before doing this please do confirm that this is
necessary from your proof-of-concept works.
Best,
Linfeng
…
I do understand that probably this will not be good enough to do dynamics
but I think it's a nice and easy test for the computational cost.
Many thanks in advance,
Jim
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/deepmodeling/deepmd-kit/issues/18#issuecomment-469669472>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ARPhi3uAi6Hoqj6VM0b09xvp9khpkrrZks5vTmlNgaJpZM4bOp_g>
.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dear DeePMD developers,
My name is Jim, I am a Msc chemistry student at the University of Amsterdam. I am currently doing my master research internship on the topic Neural network potentials.
I have read the DeePMD papers and installed your packages and I think it is really exciting stuff. However, I would like to test some things out but I am not sure how to do this.
I want to be able to take only certain "interactions" into account. With that I mean the following: say that I have a system containing water molecules, Now I want oxygen atoms to only feel hydrogen atoms instead of feeling both hydrogen atoms and oxygen atoms. The way I was thinking of achieving this is by adjusting the way the Dij matrix is created.
I want to be able to specify what atoms I want in the neighbour list, so say that I am looking at an oxygen atom, then I want its neighbour list or Dij matrix only to contain hydrogen atoms. In this way, I am forcing the oxygen atom to only feel the hydrogen atoms.
In this way, it would hopefully be possible to reduce computational cost but still obtain reliable force fields. Would this be possible to do by making adjustments to your code?
Many thanks in advance,
Jim Boelrijk
Beta Was this translation helpful? Give feedback.
All reactions