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

error happened when running your example #15

Open
A-zhudong opened this issue Dec 19, 2024 · 3 comments
Open

error happened when running your example #15

A-zhudong opened this issue Dec 19, 2024 · 3 comments

Comments

@A-zhudong
Copy link

WARNING:tensorflow:From /work/zhud/miniconda/envs/fsdp/lib/python3.9/site-packages/tensorflow/python/util/deprecation.py:588: calling function (from tensorflow.python.eager.polymorphic_function.polymorphic_function) with experimental_relax_shapes is deprecated and will be removed in a future version.
Instructions for updating:
experimental_relax_shapes is deprecated, use reduce_retracing instead
Full Formula (In1 Cu1 P2 Se6)
Reduced Formula: InCu(PSe3)2
abc : 6.427139 6.427140 23.432263
angles: 90.000000 90.000000 119.999999
pbc : True True True
Sites (10)

SP a b c


0 In 0 0 0.850752
1 Cu 0.333334 0.666668 0.850752
2 P 0.666666 0.333332 0.802163
3 P 0.666666 0.333332 0.899341
4 Se 0.341033 0.348514 0.777139
5 Se 0.007482 0.658967 0.777139
6 Se 0.007482 0.348514 0.924365
7 Se 0.651486 0.658967 0.924365
8 Se 0.341033 0.992518 0.924365
9 Se 0.651486 0.992518 0.777139
Generated SLICES: In Cu P P Se Se Se Se Se Se 0 8 o-o 0 5 o-o 0 4 ooo 0 7 --o 0 9 --o 0 6 ooo 1 7 ooo 1 4 ooo 1 9 ooo 1 6 ooo 1 5 ooo 1 8 ooo 2 9 o-o 2 5 +oo 2 3 ooo 2 4 ooo 3 6 +oo 3 8 o-o 3 7 ooo
ERROR:root:Could not obtain the lattice basis from the cycle vectors!
Traceback (most recent call last):
File "/work/user/wuzh/zd/GIT-Mol/crystal-text-llm-main/slice_example.py", line 38, in
reconstructed_structure, final_energy_per_atom = backend.SLICES2structure(slices_NdSiRu)
File "/work/zhud/miniconda/envs/fsdp/lib/python3.9/site-packages/slices/core.py", line 1865, in SLICES2structure
structures,final_energy_per_atom = self.to_structures()
File "/work/zhud/miniconda/envs/fsdp/lib/python3.9/site-packages/slices/core.py", line 1767, in to_structures
net.get_metric_tensor()
File "/work/zhud/miniconda/envs/fsdp/lib/python3.9/site-packages/slices/tobascco_net.py", line 711, in get_metric_tensor
np.dot(self.lattice_basis, self.eon_projection), self.lattice_basis.T
TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'

Could you please tell me why this happen? Thanks

@A-zhudong
Copy link
Author

### This is my code

from slices.core import SLICES
from pymatgen.core.structure import Structure

original_structure = Structure.from_file('/work/user/wuzh/zd/GIT-Mol/alignn/alignn/alignn/examples/sample_data/POSCAR-JVASP-76309.vasp')
print(original_structure)
backend = SLICES()
slices_NdSiRu = backend.structure2SLICES(original_structure)
print('Generated SLICES:', slices_NdSiRu)

if not slices_NdSiRu:
raise ValueError("SLICES conversion failed! Check the input structure.")

reconstructed_structure, final_energy_per_atom = backend.SLICES2structure(slices_NdSiRu)
print('Reconstructed structure:', reconstructed_structure)
print('Final energy per atom:', final_energy_per_atom)

@xiaohang007
Copy link
Owner

ERROR:root:Could not obtain the lattice basis from the cycle vectors!

ERROR:root:Unable to determine the lattice basis from the cycle vectors. This issue often arises when your POSCAR structure corresponds to a low-dimensional crystal structure, which our current SLI2Cry algorithm may not be equipped to process accurately (we are working on SLICES2 which can encode and decode any crystals, which will hopefully be released in January, 2025). Feel free to scan my QR code below to add me on WeChat so we can discuss this further.
55b889d56aee0497152fdde6d34d20d

@A-zhudong
Copy link
Author

Thanks for your reply and wait for your SLICES2.

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