Ejemplo n.º 1
0
def get_project_libraries(project: Project) -> Set[Library]:
    libs = set()

    for crystal in project.get_crystals():
        if crystal.is_apo():
            continue

        frag = Fragment.get_by_id(crystal.fragment_id)
        libs.add(frag.library)

    return libs
Ejemplo n.º 2
0
def _get_fragments(project: Project) -> Dict[Fragment, List]:
    fragments: Dict = {}

    for crystal in project.get_crystals():
        if crystal.is_apo():
            continue

        frag = get_crystals_fragment(crystal)
        crystals = fragments.get(frag, [])
        crystals.append(crystal)
        fragments[frag] = crystals

    return fragments