Re: [PyMOL] cmd.get_fastastr()

2020-07-07 Thread Pedro Lacerda
Thank you for this pearl. Em ter., 7 de jul. de 2020 às 11:23, Thomas Holder < thomas.hol...@schrodinger.com> escreveu: > Hi Pedro, > > I would probably just count CA atoms. Something like this: > > # Check nearby peptides > tmpsele = pm.get_unused_name("_tmp") > pm.select(tmpsele, f"({sim_pdb} a

Re: [PyMOL] cmd.get_fastastr()

2020-07-07 Thread Thomas Holder
Hi Pedro, I would probably just count CA atoms. Something like this: # Check nearby peptides tmpsele = pm.get_unused_name("_tmp") pm.select(tmpsele, f"({sim_pdb} and polymer) within 5 of " f"({entry.pdb_id} and (bysegi resid {entry.ligand_resid} " f"and chain {entry.ligand_chain}))") for

Re: [PyMOL] cmd.get_fastastr()

2020-07-06 Thread Pedro Lacerda
I used the function to check if the fasta is smaller than 25 characters. If it is then it is a peptide: https://github.com/pslacerda/pymol-labimm/blob/master/scripts/peptbase/create.py#L186 There is another way to check for peptides using only selection? Em seg., 6 de jul. de 2020 às 02:47, Thoma

Re: [PyMOL] cmd.get_fastastr()

2020-07-05 Thread Thomas Holder
Hi Pedro, cmd.get_fastastr() always returned a FASTA formatted string. What changed in PyMOL 2.2 is that it now creates a record for every chain, not just for every object. There is a new "key" argument, you get the old behavior with key="model". print(cmd.get_fastastr(key="model")) If you ac