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

How the ANN method add the bias force? #34

Open
wxsongsh opened this issue Jun 24, 2021 · 2 comments
Open

How the ANN method add the bias force? #34

wxsongsh opened this issue Jun 24, 2021 · 2 comments

Comments

@wxsongsh
Copy link

wxsongsh commented Jun 24, 2021

Dear SSAGES developers,

I want to calculate the free energy using the ANN method.

The following is the content of a JSON file used in ANN:

{
    "walkers" : 1,
    "input" : "in.metal",
    "CVs": [
        {
            "qatom": false,
            "qvmean": true,
            "short_cutoff": 2.6,
            "long_cutoff": 3.8,
            "q_dimension": 6,
            "type": "Q_Steinhardt"
        },
        {
            "short_cutoff": 2.6,
            "long_cutoff": 3.8,
            "type": "Rpp"
        }
     ],
    "methods" : [
            {
                    "type" : "ANN",
                    "topology" : [30, 20],
                    "nsweep" : 10000,
                    "overwrite_output" : false,
                    "temperature" : 1300,
                    "grid" : {
                            "lower" : [0, -1.0],
                            "upper" : [1.1, 1.1],
                            "number_points" : [50, 50],
                            "periodic" : [false, false]
                    },
                    "lower_bounds" : [-0.1, -1.1],
                    "upper_bounds" : [1.2, 1.2],
                    "lower_bound_restraints" : [0, 0],
                    "upper_bound_restraints" : [0, 0],
                    "max_iters" : 10,
                    "weight" : 15.0 // Is the unit like the lammps one, eV herein? I also use the default value and it does not work.
            }
    ]
}

Using two newly designed CVs, the metadynamics simulations are fine, where the system can traverse the distinguished states I concerned. However, the system only locate at the initial state as I use the ANN method. It means that the bias force is not added to the atoms. As I know, ANN also need add the bias force to the atoms like metadynamics. What is the wrong I meet?

The two CVs should consider the whole atoms as well as its neighbor atoms. In the corresponding XXCV.cpp, I have given the val_ value and its devirative on x (or y, z), grad_[].

The following is a JSON file used in the metadynamics simulations (It works fine):

{
    "walkers" : 1,
    "input" : "in.metal",
    "CVs": [
        {
            "qatom": false,
            "qvmean": true,
            "short_cutoff": 2.6,
            "long_cutoff": 3.8,
            "q_dimension": 6,
            "type": "Q_Steinhardt"
        },
        {
            "short_cutoff": 2.6,
            "long_cutoff": 3.8,
            "type": "Rpp"
        }
     ],
    "methods" : [
        {
            "type" : "Metadynamics",
            "widths" : [
                0.02, 0.04
            ],
            "height" : 0.103408,
            "lower_bounds" : [0, -1.0],
            "upper_bounds" : [1.1, 1.1],
            "lower_bound_restraints" : [0, 0],
            "upper_bound_restraints" : [0, 0],
            "hill_frequency" : 500
        }
    ]
}

Thanks! Looking forward to your reply.

@pabloferz
Copy link
Contributor

Hi @wxsongsh. Sorry for the delayed reply here. One thing to consider here is the roughness of the free energy as function of your CV.

Maybe the grid size is too low to effectively learn it? Can you share more details on your use case? (here or on a private channel depending on the nature of your work)

@wxsongsh
Copy link
Author

Dear Pabloferz, I study the nucleation from liquid using the Q (Steinhardt) order parameter. Q can distinguish the two liquid and crystalline phases, but it is hard to distinguish the different liquid sates. Now, the ANN method always locates at the liquid state, which seems not adding bias force on the atom to escape the liquid minimum. Using Metadynamics, the Q parameter works fine. I do not know what's wrong in the ANN.

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