Closed Surluson closed 6 years ago
I decided on having the checks separate for the remove_overlapping_atoms.
The reason was to have different messages. But thinking about it, it would probably be easier to define two different strings and reuse the checks being made in read_crystal_structure_file
Some polishing for the
read_crystal_structure_file
function.remove_overlap
is a new bool argument for the function which enables the removal of identical overlapping atoms. It calls upon the remove_overlapping_atoms function (which also runs relevant checks like overlap/charge_neutral) Ifrun_checks = false
inread_crystal_structure_file
we'll remove identical atoms and we won't be checking if the result is charge neutral or if different elements are overlapping. I made a new test structure,test_structure2B.cif
, which is identical totest_structure2.cif
, except I copied the atoms multiple times (and got rid of the number on their labels). To test the remove_overlap I compare the framework fortest_structure2.cif
andtest_structure2B.cif
(fractional coords, atoms and charges)For uniformly random rotation test I use a randomly generated radius (from
rand()
) and form a patch on the sphere and count the points on that patch. Then I userotation_matrix()
to rotate the sphere and count the points that landed on that same patch. I make sure number of points on the patch is similar. The tolerance in that check is 1% of the sample size, which is 1M points. I run this test with three randomly generated radii to make sure that doesn't affect the result.-Arni