-
Notifications
You must be signed in to change notification settings - Fork 7
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
Logging Add Electrostatics - 1 #72
Comments
In the input we can probably just store it as a mortele:~$ h5dump -n input_example.hdf5
HDF5 "input_example.hdf5" {
FILE_CONTENTS {
group /
dataset /bonds
dataset /coordinates
dataset /indices
dataset /molecules
dataset /names
dataset /types
dataset /velocities
dataset /charges <-----
}
}
mortele:~$ h5dump -d /charges input_example.hdf5
HDF5 "input_example.hdf5" {
DATASET "/charges" {
DATATYPE H5T_IEEE_F64LE
DATASPACE SIMPLE { ( N_PARTICLES ) / ( N_PARTICLES ) }
DATA {
(0): ...
(10): ...
(20): ...
...
}
}
} In the output, we need to adhere to the H5MD format, so we have to place it in a dataset at (c.f. H5MD specification)
|
Actually, we need to decide if we store charges as integers or floats. In the units we use, charges are given in terms of |
Yes, and I would like to have float numbers, which will bring much extendability. 😄 |
Easy short term fixShort term I think you should just set In the not-so-distant futureMedium term, I think we should look into refactoring the code for the Maybe we can do some smart packing of the arguments beforehand, since the only thing that the domain decomposition actually cares about is the I'm not entirely sure, but I think we can do something like the following without making any copies of any actual data: args = [None for _ in range(12)]
args[:10] = [
positions, molecules, pm, velocities, indices, bond_forces,
angle_forces, field_forces, names, types,
]
if charges_flag:
args[10] = charges
if mass_flag:
args[11] = masses
args = tuple(args[:10 + int(charges_flag) + int(mass_flag)])
dd = domain_decomposition(
*args,
molecules=molecules if molecules_flag else None,
bonds=bonds if molecules_flag else None,
verbose=args.verbose,
comm=comm,
)
(...) = dd This would make adding a new conditional array to domain decomposition a matter of adding just the |
When declare a preset args,
|
Yea, the dd = domain_decomposition(
positions,
pm,
you, # <--
can, # <--
put, # <--
what, # <--
ever, # <--
here, # <--
molecules=molecules if molecules_flag else None,
bonds=bonds if molecules_flag else None,
verbose=args.verbose,
comm=comm,
)
(
positions,
bonds,
you, # <--
can, # <--
put, # <--
what, # <--
ever, # <--
here, # <--
bonds,
molecules,
) = dd |
This should be all taken care of now. |
Fix the build of package and docs
Add charge information into H5MD under its standard identifier
Electrostatics: treat charge type interaction outside the config.n_types
Domain Decomposition
by default add; if no charges, then replace with None beforehand?add conditional judgement based on charges_flag ?put arguments in a list ---> as tuple ---> unpack together. See #Logging Add Electrostatics - 1 #72 (comment) Clean up the function calls to domain_decomposition from main #73compute charge (_q) related: field, force, energy
update_field_force_energy_q
note that there is slightly difference below; use the latter, which keeps the uncharged particles zero force
code run success commit 228c2b6
for the connivence of RESPA energy calculation, update_field_force_energy_q, split to
continued in #74
The text was updated successfully, but these errors were encountered: