A charge-flipping algorithm incorporating the tangent formula for solving difficult structures | Synapse