Scripts for form-factor dataset creation - #486
Conversation
removed commented code, dev prints and provisionary get_mean_ApL function
4e5b298 to
4cd699a
Compare
|
@BananaOverLord I've cleaned a bit. Please see the comments. The easiest way to run test sweep: cd ~/workdir
fmdl_initialize_databank toy
source databank_env.rc
/path/to/repo/develop/make_train_data.pyIt does some trajs but crashes at some point. You can debug further. Please add Ruff extension to your vscode and then add to your "ruff.configuration": "developer/ruff-dev.toml",This is the list of ruff's recomendations we are trying to obey. Your code is quite clean so I didn't do much. And it's semiautomatical with ruff. If you don't use vscode, you can add ruff to your IDE. And also periodically do |
| u.load_new(traj_centered, format="XTC") | ||
| u.guess_TopologyAttrs(force_guess=["elements"]) | ||
| mollib.guess_elements(system, u) | ||
| return u |
There was a problem hiding this comment.
I reshaped this function a bit. Now it returns the Universe.
| def recompute_extended_ff_dataset( | ||
| h5fpath: str, *, | ||
| hydration_threshold: int = 20, | ||
| recompute_centering: bool = True, | ||
| small_trajs_only: bool = False, | ||
| ) -> None: | ||
| """ | ||
| Recompute the extended form factor dataset for all systems in the databank. |
There was a problem hiding this comment.
I wrapped into a function. I prefer having just one line in main. Then we can call it as a module func.
| scalar_info = {"ApL": ApL, "thickness": thickness} | ||
|
|
||
| water_to_lipid_ratio = water_n / lipid_n | ||
| if system.get_hydration(basis="number") < hydration_threshold: |
There was a problem hiding this comment.
That's important. It's our API. It allows to remove a whell-invention block above.
| ) | ||
|
|
||
| molecule_types_selector = [ | ||
| f"resname {system['COMPOSITION'][molkey]['NAME']}" for molkey in system.content |
There was a problem hiding this comment.
that's important to know.
for molkey in system.conent:
# will go over all molecule keys
comcon1
left a comment
There was a problem hiding this comment.
A bit of comments to my cleanings.
|
Substantional questions:
|
|
To your last comment with substantial I've talked with Hanne and Samuli. |
|
📚 Documentation preview 📚: https://databank--486.org.readthedocs.build/