Pymol-Scripts / Pymol-script-repo

Collected scripts for Pymol
http://www.pymolwiki.org/index.php/Git_intro
445 stars 258 forks source link

syntax for creating sidechain pseudoatoms for selected residues #120

Closed goji-patai closed 7 months ago

goji-patai commented 2 years ago

Hi, I am hoping you can point me in the right direction. I am reading a PDB as follows:

path = 'TO PATH'
for filename in glob.glob(os.path.join(path, '*.pdb)):
    cmd.load(filename)  # use the name of your pdb file
    stored.residues = []
    cmd.iterate('name ca', 'stored.residues.append((resn))')
    #print (stored.residues)

Then I want to create a sidechain pseudoatom and save its coordinate in an array along the lines ...

    stored_residues_sidechain_PS = []
    for i in stored.residues:
        cmd.select ('resn %s' % i)
        stored_residues_sidechain_PS.append(sidechaincenters [ '(sele)' [2]])

but I am having difficulty with the correct syntax to use for sidechaincenters. Please point me in the right direction. Thank you

speleo3 commented 2 years ago

You might find this useful: https://pymolwiki.org/index.php/Sidechaincenters

goji-patai commented 2 years ago

Hi Thomas, Thank you. That was good guidance. I can now calculate the Sidechaincenters. Working on manipulating the scc object.

Best, G

On Tue, Dec 7, 2021 at 4:22 PM Thomas Holder @.***> wrote:

You might find this useful: https://pymolwiki.org/index.php/Sidechaincenters

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Pymol-Scripts/Pymol-script-repo/issues/120#issuecomment-988271668, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANJEJ7Q2RK4KB7ASQ4LFFSLUPZ3H5ANCNFSM5JQJICCQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.