Open NinadBhat opened 5 years ago
@NinadBhat To be able to aswer the question "Is there a more efficient method for unwrapping?" it would be good to write down here what is the method you are thinking about.
@jbarnoud I have updated the issue with the current methods. Kindly, have a look.
@NinadBhat make_whole
is currently just doing a breadth first search of the molecule's bonds and correcting bond lengths that are wrong as it goes. There's probably some performance that you can squeeze out of it, but I don't think the method itself is wrong/inefficient. I'd focus on getting things implemented then look at performance if you have time later.
I would be curious about the performance of an alternative algorithm: connecting all the fragments with pseudo bonds, then running make_whole
as if it was just one fragment. I do not know what the approach is worth, but it was my first idea when I thought about the issue.
The current implementation of Group.unwrap(PR #2189) works for bonded structures. This method should also work for molecules which are part of the same group, e.g., DNA molecules.
Proposed Solution
reference_point
reference_point
Questions to answered before implementation
[EDIT]
Current method I am writing method which shifts a molecule to its periodic image which is closest to the reference point. So the working will be as follows: For each molecule in a group