An algorithm for calculating intramolecular angle-dependent forces on vector computers