def get_property_for_molecule(self, molecule, property, details=None): for p in self.properties_for_molecules[molecule]: if MolecularProperty.is_same_property(property, p): if ComputationDetails.is_compatible_details(details, p.details): return p props = self.properties[molecule] for p in props: pcopy = copy(p) pcopy.molecule = molecule self.properties_for_molecules[molecule].append(pcopy) if MolecularProperty.is_same_property(property, p): if ComputationDetails.is_compatible_details(details, p.details): return pcopy raise PropertyUnavailableError
def get_property_for_molecule(self, molecule, property, details=None): for p in self.properties_for_molecules[molecule]: if MolecularProperty.is_same_property(property, p): if ComputationDetails.is_compatible_details( details, p.details): return p props = self.properties[molecule] for p in props: pcopy = copy(p) pcopy.molecule = molecule self.properties_for_molecules[molecule].append(pcopy) if MolecularProperty.is_same_property(property, p): if ComputationDetails.is_compatible_details( details, p.details): return pcopy raise PropertyUnavailableError
def has_property_for_molecule(self, molecule, property, details=None, verbose=True): if molecule in self.properties: props = self.properties[molecule] for p in props: pcopy = copy(p) pcopy.molecule = molecule self.properties_for_molecules[molecule].append(pcopy) if MolecularProperty.is_same_property(property, p): if ComputationDetails.is_compatible_details(details, p.details): return True return False
def has_property_for_molecule(self, molecule, property, details=None, verbose=True): if molecule in self.properties: props = self.properties[molecule] for p in props: pcopy = copy(p) pcopy.molecule = molecule self.properties_for_molecules[molecule].append(pcopy) if MolecularProperty.is_same_property(property, p): if ComputationDetails.is_compatible_details( details, p.details): return True return False