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

hasNumberOfAtoms field showing wrong numbers #72

Closed
NinadBhat opened this issue Apr 5, 2024 · 2 comments · Fixed by #73
Closed

hasNumberOfAtoms field showing wrong numbers #72

NinadBhat opened this issue Apr 5, 2024 · 2 comments · Fixed by #73
Labels
bug Something isn't working

Comments

@NinadBhat
Copy link
Contributor

NinadBhat commented Apr 5, 2024

Hi,

I am trying to delete an atom in the lattice and writing it to a turtle file. The final hasNumberOfAtoms recorded in the turtle file is incorrect.

Steps to reproduce

from pyscal_rdf import KnowledgeGraph, System
kg = KnowledgeGraph()

# Create Al lattice
struct_Al = System.create.element.Al(graph=kg)

# Write initial data to ttl file
kg.write("initial.ttl", format="ttl")

# Delete one atom
struct_Al.delete(indices=[0])

# Write final data to file
kg.write("final.ttl", format="ttl")

Version

pyscal3: 3.1.7
pyscal-rdf: 0.2.3

Issue

The hasNumberOfAtoms field in initial.ttl is 4, which is correct. However, the hasNumberOfAtoms field in final.ttl is 2, which seems incorrect.

Can you kindly look into this?

Thanks

@srmnitc srmnitc added the bug Something isn't working label Apr 5, 2024
@srmnitc srmnitc mentioned this issue Apr 5, 2024
@srmnitc
Copy link
Member

srmnitc commented Apr 5, 2024

@NinadBhat Thanks for reporting, this was due to a self.natoms call after deleting the atoms. This will be fixed after merging in #73.

@srmnitc
Copy link
Member

srmnitc commented Apr 5, 2024

@NinadBhat This should be fixed in v 0.2.6, feel free to reopen if need. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants