neutralize_atom.m

Contents

Version

2.11

Contact

Please report problems/bugs to michael.holmboe@umu.se

Examples

  1. atom = neutralize_atom(atom)
function atom = neutralize_atom(atom)

atom=element_atom(atom);
nAtoms=size(atom,2);

for i=1:nAtoms
    regexprep([atom(i).type],'[\d"]','');
    [atom(i).type]=strcat(atom(i).type{1}(end),{'0'});
end

if isfield(atom,'charge')
    [atom.charge]=deal(0);
end