[WIP] ANI MBIS-volume Models - #663
Conversation
|
|
||
| #energies += self.energy_networks(elem_idxs, aevs, atomic, ensemble_values) | ||
| volumes += self.volume_networks(elem_idxs, aevs, atomic = True, ensemble_values = False) #(BxN) | ||
| volumes = torch.nn.GELU(volumes) #gelu para remover sacar valores negativos |
There was a problem hiding this comment.
GELU actually allows negative values, although it is unlikely. I don't think this would be a problem in practice, but we can't say "we use gelu to get rid of negative values".
What about softplus? Maybe you could try softplus with a high beta parameter, or a sigmoid?
Alternatively we could do Vo + Vo * tanh(z/2), where Vo is the volume of the free atom?
There was a problem hiding this comment.
As another alternative, you could just shift the GELU slightly upwards to avoid the negative dip (depending on the order of magnitude of the values for the volumes this may or may not be a good idea, for instance if the volumes are ~0.1 at the smallest, and the dip is ~1e-8 then its fine, but if the dip is comparable to the smallest volumes it may cause some issues)
There was a problem hiding this comment.
I think softplus with a high beta (something like 10) can work. I'll retrain the model.
There was a problem hiding this comment.
Let me know how it goes!
| aev_computer = torchani.aev.AEVComputer.like_2x() | ||
|
|
There was a problem hiding this comment.
Recommendation: use AEVComputer.like_2x(strategy="cuaev") that will be significantly faster (if you have the cuaev installed).
Also, I don't know how fast/slow this is to train, but do you think you could train one with AEVComputer.like_2x(radial_start=0.9, angular_start=0.9, cutoff=5.2, cutoff_fn="smooth", strategy="cuaev") ? That way we can couple it with 2xr.
There was a problem hiding this comment.
I'll add a new model with those specs. Training with cuaev does work fine.
|
@justoolmos For some reason the tests are not triggering. Do you mind adding a dummy commit so I can confirm that the tests get triggered? |
…cuaev for the AEVComputer
|
@justoolmos check out the PR #675 I added a model kind of like "ANImbis" but instead it is "ANImbisv", and can predict volumes I had to make a few modifications to the repo to make this happen, I think they are for the best. You may want to merge that branch with your branch, so you already have this set up. Once your models are trained, we can just load the state_dict from your models into this model and predict the volumes. It does need some modification so that the volume networks have the correct activation function, but maybe that function can even be added to the I also added the possibility of having a volume shifter. The only thing that remains after that is hooking into the ani-amber interface. |
No description provided.