remove_occypancy_atom.m

Contents

Similar

fuse_atom

Version

2.11

Contact

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

Examples

function atom=remove_occypancy_atom(atom)

XYZ_data=[[atom.x]' [atom.y]' [atom.z]'];

[u,I,J] = unique(XYZ_data, 'rows', 'first');
hasDuplicates = size(u,1) < size(XYZ_data,1);
ixDupRows = setdiff(1:size(XYZ_data,1), I);
dupRowValues = XYZ_data(ixDupRows,:);
atom(ixDupRows)=[];