Scripts.DatabankLib.form_factor module
Module form_factor serves for bilayer form factor calculations.
- class Scripts.DatabankLib.form_factor.NumpyArrayEncoder(*args, **kwargs)[source]
Bases:
CompactJSONEncoder
- class Scripts.DatabankLib.form_factor.FormFactor(conf, traj, nbin, output, system: System, density_type='electron')[source]
Bases:
object
Calculates form factors from density profiles.
Further development will include thickness of the membrane from the intersection of lipid density and water density. Already enables to calculate electrom/mass/number densities
Density could be calculated only from the final form factor profile - testing is needed to see stability for rare species.
Examination of FF error spikes is needed!
- calculate_weight()[source]
Creates an array of weights for all atoms in the simulation.
- For electron densities:
creates dictonary of atom types and number of electrons loaded form an external file –> in the future it backmaps
the atom names to mapping files and automaticaly assigns # of electrons
- Number densities:
all weights are 1
- Mass densities:
reads masses from u.atoms.masses
- fourier(ff_density, box_z, ff_range, d_ff)[source]
Calculates fourier transform of ff_density in the FF_range. It calculates a “height” of a bin for FF puroposes; in this case the number of bins is constant and the bin width changes.
- Parameters:
ff_density (_type_) – TODO: fill
box_z (_type_) – TODO: fill
ff_range (_type_) – TODO: fill
d_ff (_type_) – TODO: fill
- Returns:
TODO: fill
- Return type:
_type_