You will count the geometrical isomers of an octahedral complex with the trans-pair method. The six corners form three pairs of opposite corners. An isomer is fixed by which ligands sit opposite each other.
The idea. Corners 0 and 1 are opposite, corners 2 and 3 are opposite, and corners 4 and 5 are opposite. Neither the order inside a pair nor the order of the pairs changes the isomer.
Your tasks.
trans_key(order) so that it returns the three trans pairs as a sorted tuple of strings, each pair written in sorted order. For ("A", "B", "A", "C", "B", "C") the answer is ("AB", "AC", "BC").count_isomers(ligands) so that it returns the number of different keys over every order of the ligands.identical_pairs(key) so that it returns how many trans pairs hold two identical ligands, such as "AA".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…