Skip to content
This repository has been archived by the owner on Jun 14, 2022. It is now read-only.

Improvements to ChemicalRecord #19

Merged
merged 3 commits into from
Jan 10, 2022
Merged

Improvements to ChemicalRecord #19

merged 3 commits into from
Jan 10, 2022

Conversation

prehner
Copy link
Contributor

@prehner prehner commented Jan 7, 2022

This PR improves the flexibility of the ChemicalRecord struct. To make it more seamlessly applicable to CAMD problems, in which the numbers of segments and bonds are non-integer, ChemicalRecord is changed to an enum that can either store the full connectivity information or only the number of segments and bonds.

Further, the chemical_record field is removed from PureRecord and ChemicalRecord obtained its own identifier field. Note that model parameters and segment information can still be stored in the same JSON file as serde will simply ignore additional entries. With this change, ChemicalRecord can be used between different crates as the single data structure required to specify molecules in group contribution methods (together with model-specific segment parameters).

@prehner
Copy link
Contributor Author

prehner commented Jan 8, 2022

With the chemical_record field being removed from PureRecord, there is no need to make the model_record field optional anymore.

@prehner prehner merged commit bd7d0e4 into main Jan 10, 2022
@prehner prehner deleted the chemical_record branch January 10, 2022 11:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant