def partial_rdf(self, spec_i, spec_j, max_r, number_of_bins): this_rdf = rdf.Rdf(max_r, number_of_bins) atoms_i = list(self.atoms_with_label(spec_i)) atoms_j = list(self.atoms_with_label(spec_j)) for atom_i in atoms_i: for atom_j in atoms_j: if atom_i is atom_j: continue dr = self.minimum_image_dr(atom_i, atom_j) if dr <= max_r: this_rdf.add_dr(dr) return this_rdf
def partial_rdf( self, spec_i, spec_j, max_r, number_of_bins ): this_rdf = rdf.Rdf( max_r, number_of_bins ) atoms_i = list( self.atoms_with_label( spec_i ) ) atoms_j = list( self.atoms_with_label( spec_j ) ) for atom_i in atoms_i: for atom_j in atoms_j: if atom_i is atom_j: continue dr = self.minimum_image_dr( atom_i, atom_j ) try: this_rdf.add_dr( dr ) except IndexError: pass except: raise return this_rdf