selection.only_defined() — select only atoms with defined coordinates

only_defined()
This returns a new selection containing only atoms from the current selection that have defined coordinates (see model.build() and model.transfer_xyz()).