Giter Site home page Giter Site logo

deepks-kit's People

Contributors

jameswind avatar njzjz-bot avatar ouqi0711 avatar tuoping avatar y1xiaoc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deepks-kit's Issues

Projector basis and spherical harmonics

In deepks/utils.py:L17, variable _coef composes _table and then DEFAULT_BASIS. I couldn't find out how _coef works for basis.

proj_basis = [[0,  # l=0 azimuthal quantum number. Is it?
  [4.0, 1.0, -1.0, 0.0, 0.0, 0.0],  # 4.0 for radial length. Is it?
  [2.0, 0.0, 1.0, -1.0, 0.0, 0.0],  # I have no idea on the 5x5 diag block
  [1.0, 0.0, 0.0, 1.0, -1.0, 0.0],
  [0.5, 0.0, 0.0, 0.0, 1.0, -1.0],
  [0.25, 0.0, 0.0, 0.0, 0.0, 1.0]],
 [1,
  [4.0, 1.0, -1.0, 0.0, 0.0, 0.0],
  [2.0, 0.0, 1.0, -1.0, 0.0, 0.0],
  [1.0, 0.0, 0.0, 1.0, -1.0, 0.0],
  [0.5, 0.0, 0.0, 0.0, 1.0, -1.0],
  [0.25, 0.0, 0.0, 0.0, 0.0, 1.0]],
 [2,
  [4.0, 1.0, -1.0, 0.0, 0.0, 0.0],
  [2.0, 0.0, 1.0, -1.0, 0.0, 0.0],
  [1.0, 0.0, 0.0, 1.0, -1.0, 0.0],
  [0.5, 0.0, 0.0, 0.0, 1.0, -1.0],
  [0.25, 0.0, 0.0, 0.0, 0.0, 1.0]],
]

The furthest code block I arrived at is pyscf/gto/mole/format_basis, and I think that [(l, ((-exp, c_1, c_2, ..), in the function comments might be related to the _coef above.

What are the rules/conventions for this format? And if you know, could you please provide me with more references for such a convention? Thanks!

basis function coefficients and exponents

Dear developers/users,

is there any simple way to print the coefficients and exponents of the gaussian primitive basis functions after a standard DFT single-point calculation? Thanks

A logger solution proposal and is there any detail planning for developing deepks-kit?

I notice deepks-kit manifesto from zhihu.com and deepmd Wechat Official Accounts, also The DeepModeling Manifesto. I hope I can do something.

This repo has few infomation about develop of deepks-kit, so is there any detail planning for deepks-kit, such as:

  • export, sharing pre-trained models, an API or standard format for other library to call? (especially when the community starts to develop more features, a stable format of pytorch model or a wrapper of model is needed.)
  • more scf softwares support, maybe like (https://github.com/njzjz/gaussianrunner)
  • necessary format exchange for wavefunc data, or maybe label wrappers?
  • even some builtin calculation with C/fortran code?
  • and would there be more class definition workflow instead of almost functions workflow like now? (It would be helpful for other developers to use deepks-kit in their codes.)

Actually I think dplibrary is one good platform for data sharing, so will there be any API for users to directly download the data, model from dplibrary? Or deepks-kit will use another work flow?

In readme.md, there are TODO section which mentions
four items to do. I offer some suggests for the second one "Rewrite all print function using logging":

I think in here logging refers to python standard library logging. And according to the library using command line mostly, we can set logging in one log.py file. Here I have two methods:

  1. A setup function like (https://github.com/sehoonha/pydart2/blob/master/pydart2/utils/log.py);
  2. Or a class Logger from logging.logger like:
import logging

from <root>.util.config import getGlobValue # get global variable

__all__ = [
    "InfoLogger", "Logger"
]

"""
Predefined Loggers for project.
Usage:
```
from ..util.logger import InfoLogger

logger = InfoLogger(__name__,...) # all log above Info level will be logged.

```

"""


class BaseLogging(logging.Logger):
    def __init__(self, name, level=logging.INFO, file=None, console_on=False):
        """

        Parameters
        ----------
        name: str
            Name of logger
        level: int
            logging.INFO, logging.DEBUG,...
        file: str or None
            File name of log.
            If None, log to console.
        console_on: bool
            If console_on, log to console anyway.
        """
        super().__init__(name, level)

        # format set of log
        fmt = "PID:%(process)d [%(asctime)s]-[%(name)s]-[%(levelname)s]-[%(filename)s,line %(lineno)d] : %(message)s"
        formatter = logging.Formatter(fmt)

        # to file
        if file:
            file_handle = logging.FileHandler(file, encoding="utf-8")
            file_handle.setFormatter(formatter)
            self.addHandler(file_handle)
        # to console when not setting log file.
        else:
            console_handle = logging.StreamHandler()
            console_handle.setFormatter(formatter)
            self.addHandler(console_handle)

        # use console out when setting log file.
        if file:
            if console_on:
                console_handle = logging.StreamHandler()
                console_handle.setFormatter(formatter)
                self.addHandler(console_handle)


class InfoLogger(BaseLogging):
    """
    Default Logger to console with INFO level.
    Set file to a real file to log in file.
    Parameters
    ----------
    name: str
        Name of logger
    """

    def __init__(self, name, **kwargs):
        super(InfoLogger, self).__init__(name=name, level=logging.INFO, **kwargs)


class DebugLogger(BaseLogging):
    """
    Default Logger to console with DEBUG level.
    Set file to a real file to log in file.
    Parameters
    ----------
    name: str
        Name of logger
    """

    def __init__(self, name, **kwargs):
        super(DebugLogger, self).__init__(name=name, level=logging.DEBUG, **kwargs)


def getLogger(level=logging.DEBUG):
    """
    Generate a logger with level.
    Parameters
    ----------
    level

    Returns
    -------
    A BaseLogging class.
    """

    class RunTimeLogger(BaseLogging):
        def __init__(self, name, **kwargs):
            super(RunTimeLogger, self).__init__(name=name, level=level, **kwargs)

        def isEnabledFor(self, level: int) -> bool:
            self.setLevel(level=getGlobValue("log_level"))
            self.level = getGlobValue("log_level")
            return super(RunTimeLogger, self).isEnabledFor(level)

    return RunTimeLogger


Logger = getLogger(level=getGlobValue("log_level"))

I hope I can do something, while I'm not sure what deepks-kit maintainers are planning now.
Moreover, it will be conventional to have a project kanban and show what maintainers are planning.

问一下对于磁性材料的交换关联

在abacus 里面 是否可以设置不同的自旋构型来学习,以及 我的训练数据的胞要不要很大,因为实验上的磁结构是一个可能涉及到很大的胞的螺旋磁结构,目前的PBE描述的不是很好,另外问一下 这个机器学习需要的资源以及时长,需不需要用到 GPU加速。

RuntimeError: No system available during deepks model training.

While running the deepks model, I encountered the following error during the iteration process:
err.iter:
#data_train/group.00 no system.raw, infer meta from data
#data_train/group.00 reset batch size to 0
#ignore empty dataset: data_train/group.00
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/home/ljcgroup/.conda/envs/deepks/lib/python3.11/site-packages/deepks/model/train.py", line 303, in
cli()
File "/home/ljcgroup/.conda/envs/deepks/lib/python3.11/site-packages/deepks/main.py", line 71, in train_cli
main(**argdict)
File "/home/ljcgroup/.conda/envs/deepks/lib/python3.11/site-packages/deepks/model/train.py", line 270, in main
g_reader = GroupReader(train_paths, **data_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ljcgroup/.conda/envs/deepks/lib/python3.11/site-packages/deepks/model/reader.py", line 207, in init
raise RuntimeError("No system is available")
RuntimeError: No system is available

Upon inspecting the iter.00/00.scf/log.data file, I noticed that none of the systems converged, leading to a lack of information for training. The content of log.data is as follows:
Training:
Convergence:
0 / 200 = 0.00000
Energy:
ME: 4.768164229534069
MAE: 8.715617244519633
MARE: 7.972705559173027
Force:
MAE: 1.0896364501030267
Testing:
Convergence:
0 / 200 = 0.00000
Energy:
ME: 4.768164229534069
MAE: 8.715617244519633
MARE: 7.972705559173027
Force:
MAE: 1.0896364501030267
I have verified that the system configurations are reasonable. Currently, another user also encountered the same problem. Any guidance on resolving this issue would be appreciated.

Environment Information: The water_single example is functioning correctly.
Thank you for your assistance!

Unable to Reshape Data Correctly - ValueError: cannot reshape array of size 28800 into shape (40000,8,18)

While running the deepks model, I encountered the following issue:
File "/home/ljcgroup/.conda/envs/deepks/lib/python3.11/site-packages/deepks/model/reader.py", line 79, in prepare
data_dm = np.load(self.d_path).reshape(raw_nframes, self.natm, self.ndesc)
ValueError: cannot reshape array of size 28800 into shape (40000,8,18)
Upon inspection, it appears that the program generated a file of size (200, 200) named l_e_delta, where e_name=l_e_delta and self.e_path = self.check_exist(e_name+".npy"). The error occurred in reader.py at line 77.data_ec = np.load(self.e_path).reshape(-1, 1) I don't know why this code resulted in an incorrect shape of (40000,1).
I expect the data from l_e_delta.npy to be reshaped to the expected shape of (200, 8, 18). I have also confirmed that the actual size of the l_e_delta.npy file is 28800 elements. Please assist in examining the code in reader.py responsible for ensuring proper data handling and reshaping.

Number of atoms in the deepks training system

I want to train a deepks model based on GaN system like single water molecule case and would like to know what are the requirements for the GaN system used to produce the dataset. Here are some queries to be answered, thanks!

  1. What is the number of system atoms to produce the deepks training dataset in the single water molecule case?
  2. What is the number of atoms of the system that should be used to do the DFT calculations to prepare the labels when preparing the deepks training dataset?
  3. What are the selection criteria for the system used to prepare the deepks dataset, including number of atoms, structural requirements?

dflow+deepks issue for Hackathon

  1. The first step is to install DeePKS-kit. Choose abacus branch if you'd like to train the DeePKS model for periodic system. After that, you may try a sample job, i.e., water_single for molecular system or water_single_lda2pbe_abacus for periodic system. When running these sample jobs, try to get some idea about the built-in workflow in DeePKS-kit.
  2. Implement the automatic workflow of the DeePKS iterative training process with dflow. The key step is to enable the parallel SCF jobs across massive computational resources (via slurm for cluster or lbg for Bohrium) and automatically collect the SCF results. You may just use the sample job in step 1 for a quick POC.
  3. (optional) Train your own DeePKS model. You may either get the energy/force label for DeePKS via your previous projects (if any) or get some highly accurate labels via online database such as sGDML. Then train the DeePKS model with the label you have and the workflow you implement in step 2.

Poor Convergence in AIMD Dataset Generation with VASP for Abacus Calculation

While generating a dataset for AIMD using VASP and subsequent calculation with Abacus, I encountered the following issues:
Upon setting the lattice constant to 1 in VASP, I received the warning message "!!! WARNING: Some atoms are too close!!!!!! Please check the nearest-neighbour list". Additionally, the convergence was very poor, approximately 0.3.
After realizing that VASP uses Angstrom units, I adjusted the lattice constant to 1.8897259886. However, none of the configurations converged.
Upon inspecting the configurations, I did not notice significant deformations beyond the normal range for molecular dynamics simulations.
I am seeking guidance on addressing these issues to ensure proper convergence.

Additional Context:
Software: VASP 6.3.1, Abacus3.5.3
The water_single example is functioning correctly.

Loss of Convergence in Iterative Loop (iter.00) Despite Initial Convergence Rates

While using DeepKS, I observed an anomaly regarding convergence rates during the initial iteration (iter. init) and subsequent iterative loop (iter.00).

During the first iteration (iter. init), the convergence rates were satisfactory with a training set rate of 0.77 and a testing set rate of 0.88.
However, upon entering the iterative loop (iter.00), the convergence rates dropped to 0, rendering further computation impossible.
Another user reported this issue as well.
屏幕截图 2024-03-06 145959

Additional Context:
Software: DeepKS, abacus 3.5.3
The DeePKS water_single example can run correctly on my machine.

Thank you so much for your help in addressing this issue.

Support of LSF system for DeePKS built-in dispatcher

As mentioned on the doc, on a local machine or on a cluster via slurm or PBS, it is recommended to use the DeePKS built-in dispatcher by machine.yaml, but for other schedule system like LSF, built-in dispatcher does not support that.

systems/group.00 failed! error: Unable to allocate 49.6 GiB for an array with shape (6663254520,) and data type float64

When I try to run a 70 atom system, it reported a memory error. So I expand the original water single example system(https://github.com/deepmodeling/deepks-kit/tree/master/examples/water_single/) to help locating the problem.

20 copies of the original water_single system(simple make a 20 copies of the original water_single system):
yaml file follow the default setting : https://github.com/deepmodeling/deepks-kit/tree/master/examples/water_single/iter/args.yaml

atom.npy:
water_single default(300, 3, 4)
20 water molecules:(400, 60, 4)
change description: I replicated 3 water atoms by 20 times. that is from 1 water molecule to 20 water molecules system; also shift x y z by 2 unit to avoid atom overlap
20 molecules frame like this:
[[ 8.00000000e+00 -5.66894076e+00 2.63522653e+01 1.37552230e+01]
[ 1.00000000e+00 -4.64473727e+00 2.62987038e+01 1.21355646e+01]
[ 1.00000000e+00 -6.54175752e+00 2.79952980e+01 1.36818251e+01]
...
[ 8.00000000e+00 3.74331059e+02 4.06352265e+02 3.93755223e+02]
[ 1.00000000e+00 3.75355263e+02 4.06298704e+02 3.92135565e+02]
[ 1.00000000e+00 3.73458242e+02 4.07995298e+02 3.93681825e+02]]
original 1 water molecule frame like this :
[[ 8.00000000e+00 -5.66894076e+00 2.63522653e+01 1.37552230e+01]
[ 1.00000000e+00 -4.64473727e+00 2.62987038e+01 1.21355646e+01]
[ 1.00000000e+00 -6.54175752e+00 2.79952980e+01 1.36818251e+01]]

energy.npy:
water_single default:(300, 1)
20 water molecules:(400, 1)
note: no change

force.npy:
water_single default(300, 3, 3)
20 water molecules(400, 60, 3)
change description: I replicated force 20 times. No change of force value, that is 20 water molecules has the same force value
20 molecules frame like this:
[[ 0.01365311 0.01130072 -0.03252444]
[-0.02535562 0.00565212 0.03616008]
[ 0.01170251 -0.01695284 -0.00363565]
...
[ 0.01365311 0.01130072 -0.03252444]
[-0.02535562 0.00565212 0.03616008]
[ 0.01170251 -0.01695284 -0.00363565]]
original 1 water molecule frame like this :
[[ 0.01365311 0.01130072 -0.03252444]
[-0.02535562 0.00565212 0.03616008]
[ 0.01170251 -0.01695284 -0.00363565]]

Error output:
key screening print:
starting step: (0,)
starting step: (0, 0)
starting step: (0, 0, 0)
new submission of d5963352-3a10-4a6c-836e-281da236d34f for chunk 43ee2d12b8f2311e3a7da9df67f22ae37cf9c937
job d5963352-3a10-4a6c-836e-281da236d34f terminated, submit again
job d5963352-3a10-4a6c-836e-281da236d34f terminated, submit again
job d5963352-3a10-4a6c-836e-281da236d34f terminated, submit again

key error from err file(in folder : deepks-kit-master/examples/water_single_one/iter/iter.init/00.scf/task.trn.00):
systems/group.00 failed! error: Unable to allocate 49.6 GiB for an array with shape (6663254520,) and data type float64
Traceback (most recent call last):
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/scf/run.py", line 268, in
cli()
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/main.py", line 174, in scf_cli
main(**argdict)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/scf/run.py", line 236, in main
meta, result = solve_mol(mol, model, fields, labels,
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/scf/run.py", line 52, in solve_mol
cf.kernel()
File "", line 2, in kernel
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/scf/hf.py", line 1692, in scf
kernel(self, self.conv_tol, self.conv_tol_grad,
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/scf/hf.py", line 128, in kernel
vhf = mf.get_veff(mol, dm)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/scf/scf.py", line 146, in get_veff
v0 = self.get_veff0(mol, dm, dm_last, v0_last, hermi)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/scf/scf.py", line 112, in get_veff0
return super().get_veff(*args, *kwargs)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/dft/rks.py", line 116, in get_veff
vj, vk = ks.get_jk(mol, dm, hermi)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/scf/hf.py", line 2047, in get_jk
self._eri = mol.intor('int2e', aosym='s8')
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/gto/mole.py", line 3460, in intor
return moleintor.getints(intor, self._atm, bas, env,
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/gto/moleintor.py", line 240, in getints
return getints4c(intor_name, atm, bas, env, shls_slice, comp,
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/gto/moleintor.py", line 598, in getints4c
out = numpy.ndarray((nao_pair
(nao_pair+1)//2), buffer=out)
numpy.core._exceptions._ArrayMemoryError: Unable to allocate 49.6 GiB for an array with shape (6663254520,) and data type float64

Running command:
python -u -m deepks iterate args.yaml

my System description:
Ubuntu18 running in VMware® Workstation 15 Pro(Windows 10, 64-bit)
4 CPU core,8G memory for Ubuntu18

Install description:
created DeePKS environment using Conda and installed pytorch following this link (https://deepks-kit.readthedocs.io/en/latest/installation.html)
then install deepks by: pip install git+https://github.com/deepmodeling/deepks-kit (master branch, not abacus branch here)


same 20 copies of water system can run correctly in deepks abacus branch, by following the setting in example/water_single_lda2pbe_abacus folder


70 atom system:
400 frames,70 atoms,C14 H1 N12 O8 S16 , float64 type
using default setting: deepks\examples\water_single\iter\args.yaml

Error output:
key screening print:
/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/paramiko/transport.py:219: CryptographyDeprecationWarning: Blowfish has been deprecated
"class": algorithms.Blowfish,
starting step: (0,)
starting step: (0, 0)
starting step: (0, 0, 0)
new submission of d5963352-3a10-4a6c-836e-281da236d34f for chunk 43ee2d12b8f2311e3a7da9df67f22ae37cf9c937
job d5963352-3a10-4a6c-836e-281da236d34f terminated, submit again
job d5963352-3a10-4a6c-836e-281da236d34f terminated, submit again
job d5963352-3a10-4a6c-836e-281da236d34f terminated, submit again
Traceback (most recent call last):
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/main.py", line 11, in
main_cli()
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/main.py", line 37, in main_cli
sub_cli(args.args)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/main.py", line 259, in iter_cli
main(**argdict)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/iterate/iterate.py", line 351, in main
iterate.run()
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/task/workflow.py", line 49, in run
task.run(curr_tag)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/task/workflow.py", line 49, in run
task.run(curr_tag)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/task/workflow.py", line 49, in run
task.run(curr_tag)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/task/task.py", line 88, in run
self.execute()
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/task/task.py", line 214, in execute
self.dispatcher.run_jobs(tdicts, group_size=self.group_size, para_deg=self.para_deg,
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/task/job/dispatcher.py", line 118, in run_jobs
while not self.all_finished(job_handler, mark_failure) :
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/task/job/dispatcher.py", line 257, in all_finished
raise RuntimeError('Job %s failed for more than 3 times' % job_uuid)
RuntimeError: Job d5963352-3a10-4a6c-836e-281da236d34f failed for more than 3 times

key error from err file: (deepks-kit-master/examples/water_single_one/iter/iter.init/00.scf/task.trn.00):
systems/group.00 failed! error: Unable to allocate 219. GiB for an array with shape (29416827846,) and data type float64
Traceback (most recent call last):
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/scf/run.py", line 268, in
cli()
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/main.py", line 174, in scf_cli
main(**argdict)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/scf/run.py", line 236, in main
meta, result = solve_mol(mol, model, fields, labels,
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/scf/run.py", line 52, in solve_mol
cf.kernel()
File "", line 2, in kernel
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/scf/hf.py", line 1692, in scf
kernel(self, self.conv_tol, self.conv_tol_grad,
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/scf/hf.py", line 128, in kernel
vhf = mf.get_veff(mol, dm)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/scf/scf.py", line 146, in get_veff
v0 = self.get_veff0(mol, dm, dm_last, v0_last, hermi)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/scf/scf.py", line 112, in get_veff0
return super().get_veff(*args, *kwargs)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/dft/uks.py", line 87, in get_veff
vj, vk = ks.get_jk(mol, dm, hermi)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/scf/uhf.py", line 902, in get_jk
self._eri = mol.intor('int2e', aosym='s8')
dddFile "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/gto/mole.py", line 3460, in intor
return moleintor.getints(intor, self._atm, bas, env,
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/gto/moleintor.py", line 240, in getints
return getints4c(intor_name, atm, bas, env, shls_slice, comp,
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/gto/moleintor.py", line 598, in getints4c
out = numpy.ndarray((nao_pair
(nao_pair+1)//2), buffer=out)
numpy.core._exceptions._ArrayMemoryError: Unable to allocate 219. GiB for an array with shape (29416827846,) and data type float64

RuntimeError when running deepks for the very first time

Python version: Python 3.8.6
I use pip to install all the required packages listed below:
torch:1.9.0
deepks :0.2.dev60+g250a15b
numpy :1.19.4
paramiko:2.7.2
pyscf :1.7.6
then I git clone the deepks-kit repository into my desktop, I run
"deepks iterate machines.yaml params.yaml systems.yaml"
in the init document as described in the README file. But then I have this error coming out
截屏2021-07-11 下午4 59 40
Any help or suggestion is appreciated.

yaml version out of date

When using the following package versions:
Package Version


bcrypt 4.0.1
certifi 2023.11.17
cffi 1.16.0
charset-normalizer 3.3.2
cryptography 41.0.5
dargs 0.4.3
deepks 0.2.dev79+g7978b39
dpdispatcher 0.6.2
idna 3.4
numpy 1.26.2
paramiko 3.3.1
pip 23.3
pycparser 2.21
PyNaCl 1.5.0
PyYAML 6.0.1
requests 2.31.0
ruamel.yaml 0.18.5
ruamel.yaml.clib 0.2.8
setuptools 68.0.0
tqdm 4.66.1
typeguard 4.1.5
typing_extensions 4.8.0
urllib3 2.1.0
wheel 0.41.2

The following error will occur:

Traceback (most recent call last):
File "/opt/mamba/envs/deepks/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/opt/mamba/envs/deepks/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/opt/mamba/envs/deepks/lib/python3.10/site-packages/deepks/main.py", line 11, in
main_cli()
File "/opt/mamba/envs/deepks/lib/python3.10/site-packages/deepks/main.py", line 37, in main_cli
sub_cli(args.args)
File "/opt/mamba/envs/deepks/lib/python3.10/site-packages/deepks/main.py", line 254, in iter_cli
argdict = deep_update(argdict, load_yaml(fl))
File "/opt/mamba/envs/deepks/lib/python3.10/site-packages/deepks/utils.py", line 138, in load_yaml
res = yaml.safe_load(fp)
File "/opt/mamba/envs/deepks/lib/python3.10/site-packages/ruamel/yaml/main.py", line 1105, in safe_load
error_deprecation('safe_load', 'load', arg="typ='safe', pure=True")
File "/opt/mamba/envs/deepks/lib/python3.10/site-packages/ruamel/yaml/main.py", line 1039, in error_deprecation
raise AttributeError(s, name=None)
AttributeError:
"safe_load()" has been removed, use

yaml = YAML(typ='safe', pure=True)
yaml.load(...)

instead of file "/opt/mamba/envs/deepks/lib/python3.10/site-packages/deepks/utils.py", line 138

    res = yaml.safe_load(fp)

The safe_load and safe_dump functions used in deepks/utils.py has been deprecated since yaml 0.15.0. See https://yaml.readthedocs.io/en/latest/api/. We should think about update the supported version of yaml package.

debug in pycharm

hi, How to debug deepks in local pycharm? Any good practice? I tried debug main.py but found many mismatch of paths

python3 ~/Downloads/git/deepks-kit/deepks/main.py iterate ../examples/water_single/init/machines.yaml ../examples/water_single/init/params.yaml ../examples/water_single/init/systems.yaml
Traceback (most recent call last):
File "/Users/bytedance/Downloads/git/deepks-kit/deepks/main.py", line 263, in
main_cli()
File "/Users/bytedance/Downloads/git/deepks-kit/deepks/main.py", line 37, in main_cli
sub_cli(args.args)
File "/Users/bytedance/Downloads/git/deepks-kit/deepks/main.py", line 259, in iter_cli
main(**argdict)
File "/Users/bytedance/Downloads/git/deepks-kit/deepks/iterate/iterate.py", line 312, in main
iterate = make_iterate(args, **kwargs)
File "/Users/bytedance/Downloads/git/deepks-kit/deepks/iterate/iterate.py", line 231, in make_iterate
systems_train = collect_systems(systems_train, os.path.join(share_folder, SYS_TRAIN))
File "/Users/bytedance/Downloads/git/deepks-kit/deepks/iterate/iterate.py", line 105, in collect_systems
parents, bases = map(list, zip(
[os.path.split(s.rstrip(os.path.sep))
ValueError: not enough values to unpack (expected 2, got 0)

Process finished with exit code 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.