Giter Site home page Giter Site logo

Coloring a specific chain about pv HOT 6 CLOSED

biasmv avatar biasmv commented on July 30, 2024
Coloring a specific chain

from pv.

Comments (6)

biasmv avatar biasmv commented on July 30, 2024

could you send me an example where this happens? I could not reproduce
the behaviour you describe. I've fixed a few other issues with recoloring
along the way, though. It's possible that one of them fixed your problem.

I tried this on the "long helices" structure available from the demo:

pv.forEach(function(go) {

go.colorBy(color.uniform('red'), go.select({chain:'A'}));
go.colorBy(color.uniform('green'));
});
pv.requestRedraw();

which gives an all-green structure

and this:

pv.forEach(function(go) {

go.colorBy(color.uniform('red'), go.select({chain:'A'}));
go.colorBy(color.uniform('green'));
});
pv.requestRedraw();

which gives chain A in red, and the other two chains in green.

from pv.

kozmad avatar kozmad commented on July 30, 2024

I've just fetched the most recent version, if you load protein 2BL2, and color using

pv.forEach(function(go) {
go.colorBy(color.uniform('green'));
go.colorBy(color.uniform('red'), go.select({cname:'A'}));
});
pv.requestRedraw();

results in 3 red chains

from pv.

biasmv avatar biasmv commented on July 30, 2024

OK, interesting. Will look into it.

from pv.

biasmv avatar biasmv commented on July 30, 2024

Should be better now

from pv.

kozmad avatar kozmad commented on July 30, 2024

Definitely! Thank you!

from pv.

biasmv avatar biasmv commented on July 30, 2024

could you send me an example where this happens? I could not reproduce
the behaviour you describe. I've fixed a few other issues with recoloring
along the way, though. It's possible that one of them fixed your problem.

I tried this on the "long helices" structure available from the demo:

pv.forEach(function(go) {

go.colorBy(color.uniform('red'), go.select({chain:'A'}));
go.colorBy(color.uniform('green'));
});
pv.requestRedraw();

which gives an all-green structure

and this:

pv.forEach(function(go) {

go.colorBy(color.uniform('red'), go.select({chain:'A'}));
go.colorBy(color.uniform('green'));
});
pv.requestRedraw();

which gives chain A in red, and the other two chains in green.

Best,
Marco

On Sep 4, 2014, at 20:32 , Dániel Kozma wrote:

When coloring a specific chain of a protein structure( go.select({cname: 'A'}) ) it turn the whole structure into the given color. Coloring the whole structure green and than e.g chain B with yellow, chain A remains green and the rest is yellow.
Untill now, I did not managed to find the solution. I've tracked back the functions and probably the error originates in the last section of recolor function.


Reply to this email directly or view it on GitHub.

from pv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.