Closed pincher-chen closed 1 year ago
Sorry for the late response, I just see it. I think it's a mistake in README.md and I have fixed it:https://github.com/bytedance/DeepSolid/commit/a56f713b277d78d340efa154d06b76f58021b6ec. cell.a is set to a string and leads to all the mistakes. cell.a should be set to a numpy array corresponding to the lattice vectors.
Hi,
When I try a example in README, an error occurs:
$ python ../bin/deepsolid --config=./config.py:He,1 --config.batch_size 4096
"jax.host_id has been renamed to jax.process_index. This alias " I0209 11:46:10.033802 140551624116032 process.py:150] Pretrain using Net distribution. Traceback (most recent call last): File "../bin/deepsolid", line 37, in
app.run(main)
File "~/anaconda3/envs/Pmg/lib/python3.7/site-packages/absl/app.py", line 308, in run
_run_main(main, args)
File "~/anaconda3/envs/Pmg/lib/python3.7/site-packages/absl/app.py", line 254, in _run_main
sys.exit(main(argv))
File "../bin/deepsolid", line 33, in main
process.process(cfg)
File "~/envs/apps/DeepSolid/DeepSolid/process.py", line 161, in process
full_det=cfg.network.detnet.full_det,
File "~/apps/DeepSolid/DeepSolid/pretrain.py", line 152, in pretrain_hartree_fock
target = scf_approx.eval_orb_mat(np.array(data.reshape([-1, cell.nelectron, 3]), dtype=np.float64))
File "~/apps/DeepSolid/DeepSolid/hf.py", line 143, in eval_orb_mat
aos = self.eval_orbitals_pbc(coord)
File "~/apps/DeepSolid/DeepSolid/hf.py", line 113, in eval_orbitals_pbc
prim_coord, wrap = distance.np_enforce_pbc(self.primitive_cell.a, coord.reshape([coord.shape[0], -1]))
File "~/apps/DeepSolid/DeepSolid/distance.py", line 178, in np_enforce_pbc
dim = latvec.shape[-1]
AttributeError: 'str' object has no attribute 'shape'
Here the code in np_enforce_pbc funcion:
$ vi /data/chenp/apps/DeepSolid/DeepSolid/distance.py +178 line 178 dim = latvec.shape[-1] line 179 epos = epos.reshape(-1, dim) line 180 recpvecs = np.linalg.inv(latvec)
I try to change latvec format to numpy, but it does not work. Have I used wrong configures?