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

Feature: Add readin-json support #3648

Merged
merged 9 commits into from
Mar 7, 2024

Conversation

grysgreat
Copy link

Added the readin part of the information output in the abacus-json tree

Linked Issue

Fix #3646

Any changes of core modules? (ignore if not applicable)

  • codes in module_io/json_output.

@grysgreat grysgreat changed the title Add readin-json support Feature: Add readin-json support Feb 27, 2024
@pxlxingliang
Copy link
Collaborator

Hi, @grysgreat Could you please run an example using your codes and paste the new contents of abacus.json?

@grysgreat
Copy link
Author

Hi, @grysgreat Could you please run an example using your codes and paste the new contents of abacus.json?

Sure! Here is the json file.

{
    "readin": {
        "stru": {
            "mag": [
                [
                    0.0,
                    0.0
                ]
            ],
            "pp": [
                "Si.pz-vbc.UPF"
            ],
            "orb": [
                "null"
            ],
            "label": [
                "Si"
            ],
            "element": [
                "Si"
            ],
            "coordinate": [
                [
                    0.0,
                    0.0,
                    0.0
                ],
                [
                    2.55,
                    2.55,
                    2.55
                ]
            ],
            "cell": [
                [
                    0.5,
                    0.5,
                    0.0
                ],
                [
                    0.5,
                    0.0,
                    0.5
                ],
                [
                    0.0,
                    0.5,
                    0.5
                ]
            ]
        }
    },
    "init": {
        "nkstot": 8,
        "nkstot_ibz": 8,
        "point_group": "T_d",
        "point_group_in_space": "O_h",
        "natom": 2,
        "nband": 14,
        "nelectron": 1,
        "nelectron_each_type": {
            "Si": 4
        }
    },
    "general_info": {
        "version": "v3.5.3",
        "commit": "c1fb6948b (Mon Feb 26 13:26:46 2024 +0800)",
        "device": "cpu",
        "mpi_num": 1,
        "omp_num": 2,
        "pseudo_dir": "../../../tests/PP_ORB",
        "orbital_dir": "",
        "stru_file": "STRU",
        "kpt_file": "",
        "start_time": "2024-02-28 20:37:08",
        "end_time": "2024-02-28 20:37:13"
    }
}

@pxlxingliang
Copy link
Collaborator

pxlxingliang commented Mar 1, 2024

Hi, @grysgreat Could you please run an example using your codes and paste the new contents of abacus.json?

Sure! Here is the json file.

The mag should be a list of double, and each element is the value of each atom.
When the STRU do not define orbital, the value of orb should be null, but not a list of string "null"

@grysgreat
Copy link
Author

Here is the new abacus.json:

{
    "init": {
        "element": {
            "Si1": "Si"
        },
        "orb": {
            "Si1": null
        },
        "pp": {
            "Si1": "Si.pz-vbc.UPF"
        },
        "coordinate": [
            [
                0.0,
                0.0,
                0.0
            ],
            [
                2.55,
                2.55,
                2.55
            ]
        ],
        "mag": [
            0.0,
            0.0
        ],
        "label": [
            "Si1"
        ],
        "cell": [
            [
                0.5,
                0.5,
                0.0
            ],
            [
                0.5,
                0.0,
                0.5
            ],
            [
                0.0,
                0.5,
                0.5
            ]
        ],
        "nkstot": 8,
        "nkstot_ibz": 8,
        "point_group": "T_d",
        "point_group_in_space": "O_h",
        "natom": 2,
        "nband": 14,
        "nelectron": 8,
        "nelectron_each_type": {
            "Si1": 4
        }
    },
    "general_info": {
        "version": "v3.5.3",
        "commit": "c1fb6948b (Mon Feb 26 13:26:46 2024 +0800)",
        "device": "cpu",
        "mpi_num": 1,
        "omp_num": 2,
        "pseudo_dir": "../../../tests/PP_ORB",
        "orbital_dir": "",
        "stru_file": "STRU",
        "kpt_file": "",
        "start_time": "2024-03-01 18:08:50",
        "end_time": "2024-03-01 18:08:55"
    }
}

@pxlxingliang
Copy link
Collaborator

Hi @grysgreat init/label should be a list of labels of each atom, and the order of label is same as that of coordinate.

@grysgreat
Copy link
Author

Fix that , here is the new abacus.json:

{
    "init": {
        "element": {
            "Si1": "Si"
        },
        "orb": {
            "Si1": null
        },
        "pp": {
            "Si1": "Si.pz-vbc.UPF"
        },
        "coordinate": [
            [
                0.0,
                0.0,
                0.0
            ],
            [
                2.55,
                2.55,
                2.55
            ]
        ],
        "mag": [
            0.0,
            0.0
        ],
        "label": [
            "Si1",
            "Si1"
        ],
        "cell": [
            [
                0.5,
                0.5,
                0.0
            ],
            [
                0.5,
                0.0,
                0.5
            ],
            [
                0.0,
                0.5,
                0.5
            ]
        ],
        "nkstot": 8,
        "nkstot_ibz": 8,
        "point_group": "T_d",
        "point_group_in_space": "O_h",
        "natom": 2,
        "nband": 14,
        "nelectron": 8,
        "nelectron_each_type": {
            "Si1": 4
        }
    },
    "general_info": {
        "version": "v3.5.3",
        "commit": "ac2c41740 (Sun Mar 3 23:10:01 2024 +0800)",
        "device": "cpu",
        "mpi_num": 1,
        "omp_num": 2,
        "pseudo_dir": "../../../tests/PP_ORB",
        "orbital_dir": "",
        "stru_file": "STRU",
        "kpt_file": "",
        "start_time": "2024-03-05 16:42:08",
        "end_time": "2024-03-05 16:42:14"
    }
}

@pxlxingliang pxlxingliang merged commit 0bd0ba7 into deepmodeling:develop Mar 7, 2024
11 checks passed
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

Successfully merging this pull request may close these issues.

Need to supplement abacusjson tree.
2 participants