def __calculate_atoms_per_cm3(self, used_lock=False):
stack = self.stack<EOL>_density_lock = self.density_lock<EOL>for _name_of_compound in stack.keys():<EOL><INDENT>if used_lock and _density_lock[_name_of_compound]:<EOL><INDENT>continue<EOL><DEDENT>molar_mass_layer, atoms_per_cm3_layer = _utilities.get_atoms_per_cm3_of_layer(<EOL>compound_dict=stack[_name_of_compound])<EOL>stack[_name_of_compound]['<STR_LIT>'] = {'<STR_LIT:value>': molar_mass_layer,<EOL>'<STR_LIT>': '<STR_LIT>'}<EOL>stack[_name_of_compound]['<STR_LIT>'] = atoms_per_cm3_layer<EOL>for _index, _name_of_ele in enumerate(stack[_name_of_compound]['<STR_LIT>']):<EOL><INDENT>stack[_name_of_compound][_name_of_ele]['<STR_LIT>'] = atoms_per_cm3_layer *stack[_name_of_compound][<EOL>'<STR_LIT>'][_index]<EOL><DEDENT><DEDENT>self.stack = stack<EOL>
calculate for each element, the atoms per cm3