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

[Feature Request] We need another LabeledSystem input and output format, such as extxyz #708

Open
QuantumMisaka opened this issue Aug 31, 2024 · 14 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@QuantumMisaka
Copy link

Summary

We wanna transform a training set stored by deepmd/raw and deepmd/npy format to another format which can be parsed by ASE or Ovito. and we need Energy/Force label in the same time.

We've tried all output in dpdata, but there're no another output for LabeledSystem valid but only deepmd/npy and deepmd/raw, only system without label can be output in xyz format and another format which only include coordinates, but not label information.

I do consider that dpdata need another io-format for LabeledSystem (not just read-in, but alos write-out),

Extxyz format is a widely used LabeledSystem and MultiSystems format, which I do think dpdata should include

Detailed Description

extxyz format information:
https://wiki.fysik.dtu.dk/ase/ase/io/formatoptions.html#extxyz

Further Information, Files, and Links

ABACUS MD_dump file and another trajectory output will also transform to extxyz format, see deepmodeling/abacus-develop#5022

@QuantumMisaka QuantumMisaka added the enhancement New feature or request label Aug 31, 2024
@ZhouXY-PKU
Copy link
Contributor

Another related issue: I have tried LabeledSystem.to_quip_gap_xyz(), which is showed with pressing the tab key after "LabeledSystem.", but sadly it cannot be used at all with the error message like "QUIPXYZFORMAT do not support System.to". So why not try to ban it from being showed with pressing the tab key after "LabeledSystem."?

@njzjz
Copy link
Member

njzjz commented Sep 2, 2024

We wanna transform a training set stored by deepmd/raw and deepmd/npy format to another format which can be parsed by ASE

Note that you can directly convert the dpdata.System to ase.Atoms, no need to have an intermediate format.

@QuantumMisaka
Copy link
Author

Note that you can directly convert the dpdata.System to ase.Atoms, no need to have an intermediate format.

Is there an simple method/function for dpdata to convert dpdata.System to ase.Atoms in a high-thoughput way? From users' side, there is much better to have a once-for-all function, instead of coding when needed

@robinzyb
Copy link
Collaborator

robinzyb commented Sep 3, 2024

What do you mean by "high-throughput way"? The Labeledsystem.to_ase_structures() should return a list of ase Atoms objects.

@njzjz
Copy link
Member

njzjz commented Sep 3, 2024

Labeledsystem.to_ase_structures()

It's LabeledSystem.to_ase_structure().

I think the more important issue is that the documentation lacks maintenance and organization, so it is not easy to find all features in the dpdata package. I don't have enough time to write documentation, though.

@ZhouXY-PKU
Copy link
Contributor

#717

@ZhouXY-PKU
Copy link
Contributor

What do you mean by "high-throughput way"? The Labeledsystem.to_ase_structures() should return a list of ase Atoms objects.

Thank you!

@ZhouXY-PKU
Copy link
Contributor

Labeledsystem.to_ase_structures()

It's LabeledSystem.to_ase_structure().

I think the more important issue is that the documentation lacks maintenance and organization, so it is not easy to find all features in the dpdata package. I don't have enough time to write documentation, though.

Thank you! I have also fixed some small bugs(#717), and now it can work.

@QuantumMisaka
Copy link
Author

Beside Labeledsystem.to_ase_structures(), is there a way read from ase Atoms to dpdata.LabeledSystems ?

@ZhouXY-PKU
Copy link
Contributor

Beside Labeledsystem.to_ase_structures(), is there a way read from ase Atoms to dpdata.LabeledSystems ?

LS = dpdata.LabeledSystem().from_ase_structure(Atoms) can work.

@ZhouXY-PKU
Copy link
Contributor

Labeledsystem.to_ase_structures()

It's LabeledSystem.to_ase_structure().

I think the more important issue is that the documentation lacks maintenance and organization, so it is not easy to find all features in the dpdata package. I don't have enough time to write documentation, though.

If possible, could you please add a column of "capabilities" to the table at https://docs.deepmodeling.com/projects/dpdata/en/master/formats.html, just like the table at https://wiki.fysik.dtu.dk/ase/ase/io/io.html?

@njzjz
Copy link
Member

njzjz commented Sep 4, 2024

If possible, could you please add a column of "capabilities" to the table at https://docs.deepmodeling.com/projects/dpdata/en/master/formats.html, just like the table at https://wiki.fysik.dtu.dk/ase/ase/io/io.html?

There has already been a Supported Conversions column.

@njzjz njzjz added the help wanted Extra attention is needed label Sep 9, 2024
@DQM520
Copy link

DQM520 commented Sep 28, 2024

#717
I met the same problem:I want to convert my .npy file to extxyz file(energy and force included) like this,how can I get it ? Can you give me some concrete procedures? I'm not familiar with dpdata and ase, thank you very much! .npy file and extxyz file attached.
68032a9902623ad5efd049bfcbe7e4d

30ff63cd9d7731d99ef10740cc77d76
9763d73b23c5f29264133cfdd86ac5c

@DQM520
Copy link

DQM520 commented Sep 29, 2024

#717
I met the same problem:I want to convert my .npy file to extxyz file(energy and force included) like this,how can I get it ? Can you give me some concrete procedures? I'm not familiar with dpdata and ase, thank you very much! .npy file and extxyz file attached.
68032a9902623ad5efd049bfcbe7e4d

30ff63cd9d7731d99ef10740cc77d76 9763d73b23c5f29264133cfdd86ac5c

I have solved this problem, thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants