marrink-lab / bentopy

Packs stuff in boxes
4 stars 0 forks source link

Implement an implied default compartment when compartment definitions are omitted #27

Closed ma3ke closed 2 months ago

ma3ke commented 6 months ago

These two configurations now produce the same behavior.

 {
        "space": {
                "size": [100, 100, 100],
-               "compartments": [
-                       {
-                               "id": "main",
-                               "shape": "spherical"
-                       }
-               ],
                "resolution": 0.5
        },
        "output": {
                "title": "3lyz",
                "dir": "outputs"
        },
        "segments": [
                {
                        "name": "3lyz",
                        "number": 100000,
-                       "compartments": ["main"],
                        "path": "structures/3lyz.pdb"
                }
        ]
 }

In case a "compartments" field is set for any of the segments, an error is thrown describing that the implied "compartments" definition in the "space" section is valid only if no segment has a "compartments" field.

ma3ke commented 2 months ago

Though we may come back to this notion later (yet I doubt it), I'm closing this now.