move the pseudopotential code somewhere so it can be reused instead of copied
move the pseudopotential code somewhere so it can be reused instead of copied