Skip to content

Conversation

@simongravelle
Copy link
Member

@simongravelle simongravelle commented Oct 12, 2024

  • fixed files and added a manifest
  • implemented a measurement of the dihedral angle instead of the end to end distance (which was too similar to the gyration radius measurement)
  • use kspace ewald instead of pppm (I think its nice to use ewald at least once, and pppm is already used in the following tutorials)
  • used a smaller PEG molecule --> and less water molecules (the tutorial was computationally expensive)
  • use write_restart instead of write_data
  • tried a less aggressive color for the notes:

image

@simongravelle simongravelle self-assigned this Oct 12, 2024
@simongravelle simongravelle changed the title Improve tutorial 3 IHomogenize and clean tutorial 3 Oct 12, 2024
@simongravelle simongravelle changed the title IHomogenize and clean tutorial 3 Homogenize and clean tutorial 3 Oct 12, 2024
@simongravelle simongravelle marked this pull request as draft October 12, 2024 20:56
@simongravelle
Copy link
Member Author

I am considered using write_restart for this tutorial instead of write_data, for variety.

@akohlmey, any preferred suffix for restart files? .res? .bin ?

@akohlmey
Copy link
Collaborator

@akohlmey, any preferred suffix for restart files? .res? .bin ?

There is no fixed convention, but most common is either restart.<name> or <name>.restart and then variants with the embedded timestep number. I've also seen .rest.

Both '.res' and '.bin' are suboptimal choices. ".res" is commonly used for "resource files" that embed icons, images and similar into executables (mostly on Windows though) and ".bin" is the suffix to change LAMMPS native dump files from text mode to binary mode.

@simongravelle
Copy link
Member Author

There is no fixed convention, but most common is either restart. or .restart and then variants with the embedded timestep number. I've also seen .rest.

OK. .restart seems fine to me.

@simongravelle
Copy link
Member Author

I am not using binary restarts usually, so I am just now discovering that .restart files do not store kspace_style. Therefore, the second run starts with the following strange input:

image

I can see that this is a documented behavior, but I was wondering is there was a reason for that, or if it was just never implemented?

I note that this is not a problem for the tutorial, on the contrary, it is a good opportunity to warn the users that not everything is stored in the .restart file.

@simongravelle simongravelle marked this pull request as ready for review October 15, 2024 20:39
@simongravelle simongravelle marked this pull request as draft October 15, 2024 20:39
@simongravelle
Copy link
Member Author

simongravelle commented Oct 16, 2024

I am interested in printing the angle of the dihedral of type 2 only. I am using a dump for that:

compute prop PEG property/local dtype
compute dphi PEG dihedral/local phi
dump mydmp all local 100 pull.dat index c_dphi c_prop

And then I use Python and NumPy to extract the histogram of the angle, before and during the pulling. It works fine, but ideally I would prefer to use only LAMMPS command (and no NumPy).

Its easy to apply the ave/histo command to all the dihedral types, but I am not sure how to apply it to only type 2... Any idea?

fix myhisto all ave/histo 100 120 15000 0 180 90 c_dphi file pull.dat ave running mode vector

@simongravelle simongravelle marked this pull request as ready for review October 19, 2024 13:02
@simongravelle
Copy link
Member Author

simongravelle commented Oct 19, 2024

@akohlmey @jrgissing I am planning to merge that one, if you don't have objection.

If you know a method to extract histograms for a certain type of dihedral (cf my previous comment on here), I am interested.

@akohlmey
Copy link
Collaborator

  • use kspace ewald instead of pppm (I think its nice to use ewald at least once, and pppm is already used in the following tutorials)

kspace ewald doubles execution time for this example. It is best used for tiny and sparse systems, since ewald scales O(N^{2/3}) with the number of particles while pppm scales O(N*log(N)) with the volume (due to the FFTs over grid points).

You could do an initial run with ewald and then switch to pppm (since they are compatible) for improved speed.

@akohlmey
Copy link
Collaborator

If you know a method to extract histograms for a certain type of dihedral (cf my previous comment on here), I am interested.

I cannot think of a way since LAMMPS doesn't have "local" style variables and while compute dihedral/local can do some computation using internal and equal style variables, there is no access to the dihedral type for that computation. This would have to be programmed into the compute (and equivalent for the other local computes).

I am busy with some upgrades to the Temple Jenkins cluster and testing scripts currently and probably would need to discuss the details first with Steve.
My recommendation is to submit a feature request issue on the LAMMPS GitHub repo.

@simongravelle simongravelle merged commit 64ea4aa into main Oct 19, 2024
@simongravelle simongravelle deleted the improve-tutorial-3 branch October 19, 2024 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants