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

[WIP] Mapping with deformation score #315

Open
wants to merge 2 commits into
base: 1.X
Choose a base branch
from

Conversation

xivh
Copy link
Contributor

@xivh xivh commented Sep 9, 2023

This is my attempt to enable mapping with deformation_cost. Based on #292, I set {"default_conflict_score" : {"method": "deformation_cost", "lattice_weight": 0.5}} in my config_props.json. This switches the method to deformation cost, but the lattice weight is always set to -1 because the options for the default energy method have lattice weight set to -1 and the new value is not read. Now the report outputs the correct score, and the lattice weight can also be set in the input settings json. However, I do not think that the conflict scoring method can be set outside of config_props.json, and I am not certain the mapping is all working correctly because the default energy method options seem to be read every time ScoreMappedProperties are created.

I also updated add_configlist_suboption to set the passed default selection in the documentation because it always said MASTER was default regardless of what the default actually was (in this case ALL is set as default).

Finally, I was thinking about setting a check for positive lattice weight in `ScoreMappedProperties::validate but I do not think that function is called anywhere.

Changing the mapping may also change the scores of already mapped structures. casm query on the last conda release and on this branch give different atomic_deformation and lattice_deformation.

This needs to be tested for imports. The casm import documentation in 2) says:

- If multiple imported structures map onto the same configuration, 
       the properties from the structure with the best for 
       "conflict_score" are used when querying properties of the 
       configuration. By default, property "energy" is used for the 
       conflict score, minimum being best.

but in the settings section:

    lattice_weight: number in range [0.0, 1.0] (optional, default=0.5) 
        Candidate configurations are compared using "deformation_cost" to 
        determine the best mapping of the import structure to a             
        configuration. The "lattice_weight" determines the relative weight
        of the "lattice_deformation_cost" and "atomic_deformation_cost"  
        when calculating the total "deformation_cost". See _____ for      
        details.

When importing structure files with no energy, the lowest deformation cost structures are not selected and both "best_score" and "score" are null.

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

Successfully merging this pull request may close these issues.

1 participant