Change the logic of the checks in the routines taking care of the nonlocal...
Change the logic of the checks in the routines taking care of the nonlocal part of the pseudopotentials. This avoid getting into the return clause when the code should fail. At the moment the code is not correct for the calculation of the electronic current in the batchified version, as some pseudopotentials are not treated using the projections matrices. With this change, this will be protected by the assertion and the code will fail, instead of doing silently something wrong (or to lead to a segmentation fault).
Adding a safeguard for some routines.
- I have checked that my code follows the Octopus coding standards
- I have added tests for all the new features added in this request.