get_num_mols#
- mbgdml.structure_gen.utils.get_num_mols(mol_fractions, molar_masses, mass_densities, shape, length_scale)[source]#
Compute the number of molecules for each species given their mole fraction and mass densities.
- Parameters:
mol_fractions (
numpy.ndarray, ndim:1) – Mole fractions of all species.molar_masses (
numpy.ndarray, ndim:1) – Molar masses of each species in g/mol.mass_densities (
numpy.ndarray, ndim:1) – Mass density of the all species in kg/m3.shape (
str) – Desired packmol shape. Supported options:sphere,box.length_scale (
float) –Relevant length scale in Angstroms for the packmol shape.
sphere: diameter;box: side length.
- Returns:
Number of molecules for the specified shape and density.
- Return type: