Compare commits

..
Author SHA1 Message Date
Tim Lorsbach 493990566a adjusted bb4g for dev 2026-10-21 12:00:02 +02:00
Tim Lorsbach 7a6d8d7aec ... 2026-10-21 11:59:53 +02:00
2 changed files with 17 additions and 10 deletions
+17 -1
View File
@@ -29,6 +29,8 @@ class SamplingAlgorithm(enum.Enum):
class BB4GConfig(EnviPyModel): class BB4GConfig(EnviPyModel):
sampling_algorithm: SamplingAlgorithm = SamplingAlgorithm.EXACT sampling_algorithm: SamplingAlgorithm = SamplingAlgorithm.EXACT
cutoff: int = -5 cutoff: int = -5
model: str = "rat"
mode: str | None = None
class UI: class UI:
title = "BB4G Configuration" title = "BB4G Configuration"
@@ -44,6 +46,18 @@ class BB4GConfig(EnviPyModel):
order=2, order=2,
placeholder="If unset defaults to -5" placeholder="If unset defaults to -5"
) )
model = UIConfig(
widget=WidgetType.TEXT,
label="BB4G Model",
order=3,
placeholder="If unset defaults to rat"
)
mode = UIConfig(
widget=WidgetType.TEXT,
label="BB4G Mode",
order=4,
placeholder="If unset defaults to None"
)
# Once stable these will be exposed by enviPy-plugins lib # Once stable these will be exposed by enviPy-plugins lib
@@ -127,7 +141,7 @@ class BB4G(Classifier):
def run(self, eP: EnviPyDTO, *args, **kwargs) -> RunResult: def run(self, eP: EnviPyDTO, *args, **kwargs) -> RunResult:
# Ensure Service is running # Ensure Service is running
self.start() # self.start()
smiles = [c.smiles for c in eP.get_compounds()] smiles = [c.smiles for c in eP.get_compounds()]
preds = self._post(smiles) preds = self._post(smiles)
@@ -167,6 +181,8 @@ class BB4G(Classifier):
"smiles": smi, "smiles": smi,
"sampling_alg": self.config.sampling_algorithm.value, "sampling_alg": self.config.sampling_algorithm.value,
"cutoff": self.config.cutoff, "cutoff": self.config.cutoff,
"model": self.config.model,
"mode": self.config.mode,
} }
retries = 0 retries = 0
-9
View File
@@ -283,15 +283,6 @@
{{ ne.content }} {{ ne.content }}
</p> </p>
</div> </div>
<a href="{{ ne.url }}" class="btn btn-primary btn-sm w-full group-hover:btn-active mt-1">
Read Full
<svg xmlns="http://www.w3.org/2000/svg" class="h-3.5 w-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path>
<polyline points="15 3 21 3 21 9"></polyline>
<line x1="10" y1="14" x2="21" y2="3"></line>
</svg>
</a>
</div> </div>
{% endfor %} {% endfor %}
</div> </div>