Skip to content

FCSXML file #38

@nim-hrkn

Description

@nim-hrkn

The preparation stage of AiiDA CalcJob does not allow direct use of file paths, which makes it difficult to create AiiDA scripts using ALM.
Python code is

            reg = LinearRegression(fit_intercept=False).fit(X, y)
            alm.set_fc(reg.coef_)
            alm.save_fc(filename=fname_fcs, format="alamode")

and fname_fcs is used in anphon input as

 FCSXML = {fname_fcs}

But, AiiDA can't specify fname_fcs as far as I understand. AiiDA script must be something like

 with folder.open(self.options.input_filename, 'w', encoding='utf8') as handle:
            make_alm_in(alm_param, handle=handle)

Is it possible to use the file hander instead of fname_fcs?

Probably
fc2 = alm.get_fc(1, mode='all')
can obtain all the harmonic force costants.

Though https://alm.readthedocs.io/en/develop/python-module.html?highlight=create_dataset intoduces

    with h5py.File('fc.hdf5', 'w') as w:
        w.create_dataset('fc2', data=fc2, compression='gzip')
        w.create_dataset('fc3', data=fc3, compression='gzip')

how can I make the FCSXML file from fc2?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions