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

file prefix results in inconsistent naming #129

Open
alinelena opened this issue May 4, 2024 · 6 comments · Fixed by #138
Open

file prefix results in inconsistent naming #129

alinelena opened this issue May 4, 2024 · 6 comments · Fixed by #138
Labels
bug Something isn't working janus

Comments

@alinelena
Copy link
Member

alinelena commented May 4, 2024


-rw-r--r-- 1 scarf562 cseg  32K May  4 06:12 SiO2+B2O3-T3000.0-p2000.0-res-4000.xyz
-rw-r--r-- 1 scarf562 cseg  32K May  4 06:13 SiO2+B2O3-T3000.0-p2000.0-res-5000.xyz
-rw-r--r-- 1 scarf562 cseg  32K May  4 06:13 SiO2+B2O3-T3000.0-p2000.0-res-6000.xyz
-rw-r--r-- 1 scarf562 cseg  32K May  4 06:14 SiO2+B2O3-T3000.0-p2000.0-res-7000.xyz
-rw-r--r-- 1 scarf562 cseg  13K May  4 06:14 SiO2+B2O3-stats.dat
-rw-r--r-- 1 scarf562 cseg 2.2M May  4 06:14 SiO2+B2O3-traj.xyz

expected same scheme fileprefix-ensemble-t-[pressure]-[stats|traj|res]

alinelena pushed a commit to alinelena/janus-core that referenced this issue May 4, 2024
alinelena pushed a commit to alinelena/janus-core that referenced this issue May 4, 2024
alinelena pushed a commit to alinelena/janus-core that referenced this issue May 4, 2024
@ElliottKasoar
Copy link
Member

ElliottKasoar commented May 7, 2024

What was the command that you used for this output? If I run something like

janus md --ensemble npt --struct tests/data/NaCl.cif --temp-start 20 --temp-end 30 --temp-step 10 --temp-time 100 --stats-every 100  --steps 20

then the stats and traj files are

NaCl-npt-T20.0-T30.0-T300.0-p0.0-stats.dat
NaCl-npt-T20.0-T30.0-T300.0-p0.0-traj.xyz

which looks fine?

To me, if a user sets the file file-prefix, I consider that to be everything other than what is necessary to separate the different files, so could be as minimalistic as possible.

Otherwise you're basically just setting the structure name, which admittedly can't be done currently via janus md, but can in general be done by setting struct_name when calling SinglePoint, so could be added.

@alinelena
Copy link
Member Author

What was the command that you used for this output? If I run something like

janus md --ensemble npt --struct tests/data/NaCl.cif --temp-start 20 --temp-end 30 --temp-step 10 --temp-time 100 --stats-every 100  --steps 20

then the stats and traj files are

NaCl-npt-T20.0-T30.0-T300.0-p0.0-stats.dat
NaCl-npt-T20.0-T30.0-T300.0-p0.0-traj.xyz

which looks fine?

To me, if a user sets the file file-prefix, I consider that to be everything other than what is necessary to separate the different files, so could be as minimalistic as possible.

Otherwise you're basically just setting the structure name, which admittedly can't be done currently via janus md, but can in general be done by setting struct_name when calling SinglePoint, so could be added.

had file prefix in it.

@ElliottKasoar
Copy link
Member

What was the command that you used for this output? If I run something like

janus md --ensemble npt --struct tests/data/NaCl.cif --temp-start 20 --temp-end 30 --temp-step 10 --temp-time 100 --stats-every 100  --steps 20

then the stats and traj files are

NaCl-npt-T20.0-T30.0-T300.0-p0.0-stats.dat
NaCl-npt-T20.0-T30.0-T300.0-p0.0-traj.xyz

which looks fine?
To me, if a user sets the file file-prefix, I consider that to be everything other than what is necessary to separate the different files, so could be as minimalistic as possible.
Otherwise you're basically just setting the structure name, which admittedly can't be done currently via janus md, but can in general be done by setting struct_name when calling SinglePoint, so could be added.

had file prefix in it.

Cool yes, so that's sort of my point. I'd argue the traj and stats files are what I expect if your prefix is SiO2+B2O3.

If you always want file names to include the ensemble, temperatures, pressure etc. and only want to change the chemical formula at the start, we should just add an option to set the structure name, and there'd be no need to set the file prefix.

In fact, if we never want to be able to have simple file names without npt-T300..., we probably don't need the file prefix at all.

I think the results files are what are wrong, certainly in terms of my intent.

@alinelena
Copy link
Member Author

What was the command that you used for this output? If I run something like

janus md --ensemble npt --struct tests/data/NaCl.cif --temp-start 20 --temp-end 30 --temp-step 10 --temp-time 100 --stats-every 100  --steps 20

then the stats and traj files are

NaCl-npt-T20.0-T30.0-T300.0-p0.0-stats.dat
NaCl-npt-T20.0-T30.0-T300.0-p0.0-traj.xyz

which looks fine?
To me, if a user sets the file file-prefix, I consider that to be everything other than what is necessary to separate the different files, so could be as minimalistic as possible.
Otherwise you're basically just setting the structure name, which admittedly can't be done currently via janus md, but can in general be done by setting struct_name when calling SinglePoint, so could be added.

had file prefix in it.

Cool yes, so that's sort of my point. I'd argue the traj and stats files are what I expect if your prefix is SiO2+B2O3.

If you always want file names to include the ensemble, temperatures, pressure etc. and only want to change the chemical formula at the start, we should just add an option to set the structure name, and there'd be no need to set the file prefix.

In fact, if we never want to be able to have simple file names without npt-T300..., we probably don't need the file prefix at all.

I think the results files are what are wrong, certainly in terms of my intent.

at the moment, if you add file_prefix you get inconsistent results, as per list, some get decorations of ensemble|T|p some do not... and a suffix this just brings the things in line.

if we want full flexibility we shall have have an option for each file to overwrite it.

the use case for file_prefix in my mind is to overwrite structure name. eg. I do a geometry optimisation of some heating and end up with aname-opt.xyz or aname-T200-final.xyz if I start an md from that file I want aname-{ensemble}-{T}-[{p}]-suffix.ext

@ElliottKasoar
Copy link
Member

ElliottKasoar commented May 8, 2024

What was the command that you used for this output? If I run something like

janus md --ensemble npt --struct tests/data/NaCl.cif --temp-start 20 --temp-end 30 --temp-step 10 --temp-time 100 --stats-every 100  --steps 20

then the stats and traj files are

NaCl-npt-T20.0-T30.0-T300.0-p0.0-stats.dat
NaCl-npt-T20.0-T30.0-T300.0-p0.0-traj.xyz

which looks fine?
To me, if a user sets the file file-prefix, I consider that to be everything other than what is necessary to separate the different files, so could be as minimalistic as possible.
Otherwise you're basically just setting the structure name, which admittedly can't be done currently via janus md, but can in general be done by setting struct_name when calling SinglePoint, so could be added.

had file prefix in it.

Cool yes, so that's sort of my point. I'd argue the traj and stats files are what I expect if your prefix is SiO2+B2O3.
If you always want file names to include the ensemble, temperatures, pressure etc. and only want to change the chemical formula at the start, we should just add an option to set the structure name, and there'd be no need to set the file prefix.
In fact, if we never want to be able to have simple file names without npt-T300..., we probably don't need the file prefix at all.
I think the results files are what are wrong, certainly in terms of my intent.

at the moment, if you add file_prefix you get inconsistent results, as per list, some get decorations of ensemble|T|p some do not... and a suffix this just brings the things in line.

if we want full flexibility we shall have have an option for each file to overwrite it.

the use case for file_prefix in my mind is to overwrite structure name. eg. I do a geometry optimisation of some heating and end up with aname-opt.xyz or aname-T200-final.xyz if I start an md from that file I want aname-{ensemble}-{T}-[{p}]-suffix.ext

I agree the results are inconsistent, which needs fixing, I'm just disagreeing about which files are the problem.

We do have individual options for each file e.g. --traj-file, --stats-file etc. already, but at least when I'm testing things, I find it useful to be able to say I want (MOF1-traj, MOF1-stats, MOF1-res...) or (test-traj, test-stats, test-res...), without all the extra information that can actually make it harder to distinguish between files at a glance.

If we really don't want that, and only want to be able to name the structure, that's fine, but I don't think the approach in #136 is necessary. I think we just need to add a structure name option to the CLI, which MD can already take, and I think everything should work as you described.

E.g.

janus md --ensemble npt --struct tests/data/NaCl.cif --temp 300 --steps 200 --stats-every 100 --restart-every 100 --struct-name "TEST" --traj-every 10
TEST-npt-T300.0-p0.0-res-100.xyz
TEST-npt-T300.0-p0.0-stats.dat
md_summary.yml
md.log
TEST-npt-T300.0-p0.0-traj.xyz
TEST-npt-T300.0-p0.0-res-200.xyz
TEST-npt-T300.0-p0.0-final.xyz

@ElliottKasoar
Copy link
Member

We can use --struct-name as described above, but when using --file-prefix, the files remain inconsistent.

@ElliottKasoar ElliottKasoar reopened this May 8, 2024
@ElliottKasoar ElliottKasoar added bug Something isn't working janus labels May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working janus
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants