Fix compile error with lpmdformat.

Loop over atoms in ::WriteMolecule() was incorrect
and OBMol::GetAtom() was called with an invalid variable.
Fix typo in OOP bending evaluation.

Bug found by Athanasios Anthopoulos <AnthopoulosA@cardiff.ac.uk>.