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

Automatic retrieval based on input #13

Open
kjappelbaum opened this issue May 29, 2019 · 0 comments
Open

Automatic retrieval based on input #13

kjappelbaum opened this issue May 29, 2019 · 0 comments
Assignees
Labels
discussion discussion is needed enhancement feature feature request

Comments

@kjappelbaum
Copy link
Contributor

Needs discussion.

For some, especially smaller, files one could enhance the user experience by automatic retrieval and automatic parsing. I especially think of the the MSD and radial distribution functions.

For the RDF i currently use something like

        # ToDo: this is not really elegant, optimize it
        if 'ComputeRDF' in self.ctx.parameters['GeneralSettings'].keys():
            if self.ctx.parameters['GeneralSettings']['ComputeRDF'] in [
                    'yes', 'YES', 'Yes'
            ]:
                self.ctx.settings = ParameterData(
                    dict={
                        'additional_retrieve_list':
                        ['RadialDistributionFunctions/System_0/*'],
                    })

which of course would be needed to be generalized to multiple systems. It can get large if the user specifies a lot of different atom types.

In my case, I also parse the RDF. One could save space by saving r only once as it is the same for all files.

def parse_rdfs(rdf_file_list):
    rdf_dict = {}
    for file in rdf_file_list:
        name = Path(file).stem.strip('RDF_')
        df = pd.read_csv(file, comment='#', header=None, sep='\s+')
        r = df.iloc[:, 0].values
        rdf = df.iloc[:, 1].values
        rdf_dict[name] = {'r': r, 'rdf': rdf}
    return rdf_dict

Linking @danieleongari for notice.

@kjappelbaum kjappelbaum changed the title [Feature Request] Automatic retrieval base on input [Feature Request] Automatic retrieval based on input May 29, 2019
@yakutovicha yakutovicha changed the title [Feature Request] Automatic retrieval based on input Automatic retrieval based on input May 29, 2019
@yakutovicha yakutovicha self-assigned this May 29, 2019
@yakutovicha yakutovicha added discussion discussion is needed enhancement feature feature request labels May 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion discussion is needed enhancement feature feature request
Projects
None yet
Development

No branches or pull requests

2 participants