def ListFileInfo(Infile):
    """List information for macromolecules in a file."""

    FileDir, FileName, FileExt = MiscUtil.ParseFileName(Infile)
    MolName = FileName

    # Load infile...
    pymol.cmd.load(Infile, MolName)

    ChainIDs = PyMOLUtil.GetChains(MolName)
    ListHeaderInfo(Infile)

    ListChainsInfo(MolName, ChainIDs)
    ListChainsResiduesInfo(MolName, ChainIDs)

    ListLigandsInfo(MolName, ChainIDs)
    ListSolventsInfo(MolName, ChainIDs)
    ListInorganicsInfo(MolName, ChainIDs)

    ListPocketsInfo(MolName, ChainIDs)

    ListInterfaceResiduesInfo(MolName, ChainIDs)
    ListSurfaceResiduesInfo(MolName, ChainIDs)
    ListPhiPsiAnglesInfo(MolName, ChainIDs)

    ListBoundingBoxInfo(MolName)

    # Delete infile object...
    pymol.cmd.delete(MolName)

    ListFileSizeAndModificationInfo(Infile)
Ejemplo n.º 2
0
def RetrieveChainIDs(Infile, InfileRoot):
    """Retrieve chains IDs for an input file."""

    pymol.cmd.reinitialize()

    MolName = InfileRoot
    pymol.cmd.load(Infile, MolName)

    ChainIDs = PyMOLUtil.GetChains(MolName)
    pymol.cmd.delete(MolName)

    if ChainIDs is None:
        ChainIDs = []

    # Print out chain and ligand IDs...
    ChainInfo = ", ".join(ChainIDs) if len(ChainIDs) else "None"
    MiscUtil.PrintInfo("Chain IDs: %s" % ChainInfo)

    return ChainIDs
Ejemplo n.º 3
0
def RetrieveChainsIDs():
    """Retrieve chain IDs. """

    MolName = OptionsInfo["InfileRoot"]
    Infile = OptionsInfo["Infile"]
    
    MiscUtil.PrintInfo("\nRetrieving chains information for input file %s..." % Infile)

    LoadMolecule(Infile, MolName)

    ChainIDs = PyMOLUtil.GetChains(MolName)
    
    DeleteMolecule(MolName)

    if ChainIDs is None:
        ChainIDs = []

    # Print out chain and ligand IDs...
    ChainInfo = ", ".join(ChainIDs) if len(ChainIDs) else "None"
    MiscUtil.PrintInfo("Chain IDs: %s" % ChainInfo)
                         
    OptionsInfo["ChainIDs"] = ChainIDs