##################################
#Function to be used by select_sdf to unselect 
# entries with zero atoms

sub is_sdf_record_kept
{
        my $sdf_entry = shift ;    #retrieve first argument: pointer to the current sdf entry
        my $record_number = shift ; #retrieve second argument: record number
        
        #Check the validity of the first argument
        defined $sdf_entry || die "Assertion failed" ;
        
		printf STDERR "%d\t", $record_number ;
       
	   	my $n = $sdf_entry->{'molecule'}->{'number_of_atoms'} ;
		
		defined( $n )  || die "assertion failed" ;
		 $n >= 0      || die "assertion failed" ;
	
	   return	$n != 0 ;
	
}
1;
##################################
