fixes and NOT tested implementation of Energy() and OptimizedGeometry() for NWCHem