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

Using your evaluation script (compute_metrics.py) #48

Open
anshumansinha16 opened this issue Aug 5, 2023 · 1 comment
Open

Using your evaluation script (compute_metrics.py) #48

anshumansinha16 opened this issue Aug 5, 2023 · 1 comment

Comments

@anshumansinha16
Copy link

Hi, thanks for the repository.

I wanted to use your metrics script to evaluate generated structures from mp_20 dataset. I have the training dataset and the generated dataset both in .cif format. I wish to ask, how may I use your script to evaluate the performance of my model?

As per my understanding we need of compute_metrics.py in order to get the crystal list we need to convert the .cif structure to a data dictionary with keys : {frac_coords, atom_types, lengths, angles, num_atoms}.

How to get these values for the above keys from my .cif file ?

compute_metrics.py :

def get_crystal_array_list(file_path, batch_idx=0):

def get_crystal_array_list(file_path, batch_idx=0):

    data = load_data(file_path)

    crys_array_list = get_crystals_list(
        data['frac_coords'][batch_idx],
        data['atom_types'][batch_idx],
        data['lengths'][batch_idx],
        data['angles'][batch_idx],
        data['num_atoms'][batch_idx])
@confymacs
Copy link

Hi, I think if you have the .cif structure, you could get all these parameters by feeding the cif to the 'Structure' class in pymatgen. Details can be found in cdvae/common/data_utils.py

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