From b7ee02e90665319606408394813fcf80fe1176c8 Mon Sep 17 00:00:00 2001 From: rugeli <91452427+rugeli@users.noreply.github.com> Date: Mon, 6 Nov 2023 22:56:17 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20main=20@=202?= =?UTF-8?q?c5e04bf6a265f473dcaddd3e58dc00e16833e88=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _modules/cellpack/autopack/loaders/migrate_v1_to_v2.html | 2 ++ _modules/cellpack/autopack/loaders/migrate_v2_to_v2_1.html | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/_modules/cellpack/autopack/loaders/migrate_v1_to_v2.html b/_modules/cellpack/autopack/loaders/migrate_v1_to_v2.html index 60c81fac5..c6c17d5f9 100644 --- a/_modules/cellpack/autopack/loaders/migrate_v1_to_v2.html +++ b/_modules/cellpack/autopack/loaders/migrate_v1_to_v2.html @@ -144,6 +144,8 @@

Source code for cellpack.autopack.loaders.migrate_v1_to_v2

new_ingredient["representations"] = get_representations(old_ingredient) if new_ingredient["type"] == INGREDIENT_TYPE.SINGLE_SPHERE: new_ingredient["radius"] = old_ingredient["radii"][0][0] + if "partners" in new_ingredient and not new_ingredient["partners"].get("names"): + del new_ingredient["partners"] return new_ingredient
diff --git a/_modules/cellpack/autopack/loaders/migrate_v2_to_v2_1.html b/_modules/cellpack/autopack/loaders/migrate_v2_to_v2_1.html index 4d7e7b006..0567ff829 100644 --- a/_modules/cellpack/autopack/loaders/migrate_v2_to_v2_1.html +++ b/_modules/cellpack/autopack/loaders/migrate_v2_to_v2_1.html @@ -47,7 +47,7 @@

Source code for cellpack.autopack.loaders.migrate_v2_to_v2_1

[docs] def convert_partners(object_data): partners_list = [] - if "names" not in "partners": + if "names" not in object_data["partners"]: return partners_list for index, name in enumerate(object_data["partners"]["names"]): positions = object_data["partners"]["positions"] @@ -58,7 +58,10 @@

Source code for cellpack.autopack.loaders.migrate_v2_to_v2_1

binding_probability = 1.0 if "probability_binding" in object_data["partners"]: binding_probability = object_data["partners"]["probability_binding"] - if "probability_repelled" in object_data["partners"]: + if ( + "probability_repelled" in object_data["partners"] + and object_data["partners"]["probability_repelled"] < 0 + ): binding_probability = -object_data["partners"]["probability_repelled"] partner = {