Exemplo n.º 1
0
 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
Exemplo n.º 2
0
 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
Exemplo n.º 3
0
 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
Exemplo n.º 4
0
 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