From: John B. <jm...@eb...> - 2017-06-15 15:25:17
|
Dear Julian You can also try the PDB plugin which places each chain into a selection automatically for you. https://pymolwiki.org/index.php/PDB_plugin Regards John PDBe On 12/06/2017 17:10, Thomas Holder wrote: > Hi Julian, > > A one-liner to create chain selections looks like this: > > for c in cmd.get_chains(): cmd.select("chain_" + c, "chain " + c) > > PyMOL doesn't provide access to the PDB header fields. In principle PyMOL provides a way to access everything inside mmCIF files, see: > > https://pymolwiki.org/index.php/Cif_keepinmemory > > However, instead of doing this, I recommend to use the PDBe web API which provides the data in a friendly JSON data structure. I've attached a Python script which creates molecule (or chain) selections for 5n61 as an example. I recommend to load PDB structures from mmCIF or MMTF format, which not only have chain identifiers, but also molecule identifiers ("segi" field in PyMOL). > > Hope that helps. > > Cheers, > Thomas > >> On Jun 12, 2017, at 12:21 PM, Julian Reitz <jul...@gm...> wrote: >> >> Dear all, >> >> I have a pdb-file with multiple chains (5N61). >> >> Is there an easy way to create selections for all the chains that are defined in the pdb-header (A to U) without doing it manually for every chain (select A, chain A)? >> Is it also possible to use the MOLECULE information from the header to name the selections? >> >> Thank you in advance, >> >> Julian > -- > Thomas Holder > PyMOL Principal Developer > Schrödinger, Inc. > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > _______________________________________________ > PyMOL-users mailing list (PyM...@li...) > Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users > Archives: http://www.mail-archive.com/pym...@li... -- John Berrisford PDBe European Bioinformatics Institute (EMBL-EBI) European Molecular Biology Laboratory Wellcome Trust Genome Campus Hinxton Cambridge CB10 1SD UK Tel: +44 1223 492529 http://www.pdbe.org http://www.facebook.com/proteindatabank http://twitter.com/PDBeurope |