You will write functions that turn a structure name and two radii into a cell edge, a density and a coordination number.
The idea. Rock salt has and 4 formula units. Caesium chloride has and 1 formula unit. Zinc blende has and 4 formula units. In rock salt the anions touch when the edge from the radii is less than .
Your tasks.
edge(structure, r_plus, r_minus) for "NaCl", "CsCl" and "ZnS", in pm.formula_units(structure).density(structure, M, a) in g/cm³, with a in pm.rock_salt_edge(r_plus, r_minus) so that it returns the larger of the two edges: the one set by cation and anion, and the one set by anions that touch.Run your code once to unlock the worked solution.
Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…