Ngl: How to show contacts between two separate PDB files?

Created on 7 Oct 2018  路  4Comments  路  Source: nglviewer/ngl

Hi Dr. Rose

I want to show the contacts between 2 PDB files instead of showing the inner bonds in each protein, how should I set the setting?

Thank you
Yekai

question

All 4 comments

There's an example here: https://codepen.io/arose/pen/VQjBGq

You need to concat the two (or more) structures to make one component. NGL can only use atoms from a single component when creating a representation (component == PDB file in this case).

Nice example, thanks @fredludlow!

Many thanks @fredludlow !
But I am also wondering how to select specifically the the contacts between the two structures within the "concat" structure rather than all bonds in that structure. Should I set the "sele" attribute in it? And I saw the sele attribute in the example here is: sele: "/0 or /2". What does /0 or /2 mean?

When you concat files like that they get added as separate models, so in the example linked above the protein is model 0 and the various ligand poses in the sdf file are models 1 onwards. The /n simply specifies a model, so /0 or /2 means calculate all contacts between all atoms in "model 0 or 2" (the full selection syntax is here)

You can then filter which contacts are displayed with filterSele. In that particular example if you add filterSele: "/2" to the contact parameters it will only display contacts that involve an atom in model 2, which I think is what you're after.

This would still show intramolecular contacts in the ligand if they were present (I'm not sure there's a way to prevent that).

HTH!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fcharih picture fcharih  路  3Comments

biharck picture biharck  路  6Comments

josemduarte picture josemduarte  路  4Comments

sunhwan picture sunhwan  路  4Comments

arose picture arose  路  3Comments