Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def need_fit(self):
fs = [
sf.PartialRadialDistributionFunction(),
sf.BondFractions(),
sf.BagofBonds(coulomb_matrix=sf.CoulombMatrix()),
sf.BagofBonds(coulomb_matrix=sf.SineCoulombMatrix()),
]
return self._get_featurizers(fs)
def all(self):
fs = [
# Vector
self.ssf.from_preset("CrystalNNFingerprint_ops"),
self.ssf.from_preset("BondLength-dejong2016"),
self.ssf.from_preset("BondAngle-dejong2016"),
self.ssf.from_preset("Composition-dejong2016_SD"),
self.ssf.from_preset("Composition-dejong2016_AD"),
self.ssf.from_preset("CoordinationNumber_ward-prb-2017"),
self.ssf.from_preset("LocalPropertyDifference_ward-prb-2017"),
sf.BondFractions(approx_bonds=False),
sf.BagofBonds(coulomb_matrix=sf.CoulombMatrix()),
sf.BagofBonds(coulomb_matrix=sf.SineCoulombMatrix()),
sf.CoulombMatrix(flatten=True),
sf.BondFractions(),
# Non vector
sf.CoulombMatrix(flatten=False), # returns matrix
sf.SineCoulombMatrix(flatten=False), # returns matrix
sf.RadialDistributionFunction(), # returns dict
sf.MinimumRelativeDistances(), # returns a list
sf.ElectronicRadialDistributionFunction(), # returns ??
sf.PartialRadialDistributionFunction(), # returns ??
]
fs += self.heavy
return self._get_featurizers(fs)
def express(self):
fs = [
sf.DensityFeatures(),
sf.GlobalSymmetryFeatures(),
sf.EwaldEnergy(),
sf.SineCoulombMatrix(flatten=True),
sf.GlobalInstabilityIndex(),
sf.StructuralComplexity(),
]
return self._get_featurizers(fs)
def debug(self):
return self._get_featurizers([sf.SineCoulombMatrix(flatten=True)])
# Vector
self.ssf.from_preset("CrystalNNFingerprint_ops"),
self.ssf.from_preset("BondLength-dejong2016"),
self.ssf.from_preset("BondAngle-dejong2016"),
self.ssf.from_preset("Composition-dejong2016_SD"),
self.ssf.from_preset("Composition-dejong2016_AD"),
self.ssf.from_preset("CoordinationNumber_ward-prb-2017"),
self.ssf.from_preset("LocalPropertyDifference_ward-prb-2017"),
sf.BondFractions(approx_bonds=False),
sf.BagofBonds(coulomb_matrix=sf.CoulombMatrix()),
sf.BagofBonds(coulomb_matrix=sf.SineCoulombMatrix()),
sf.CoulombMatrix(flatten=True),
sf.BondFractions(),
# Non vector
sf.CoulombMatrix(flatten=False), # returns matrix
sf.SineCoulombMatrix(flatten=False), # returns matrix
sf.RadialDistributionFunction(), # returns dict
sf.MinimumRelativeDistances(), # returns a list
sf.ElectronicRadialDistributionFunction(), # returns ??
sf.PartialRadialDistributionFunction(), # returns ??
]
fs += self.heavy
return self._get_featurizers(fs)