Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't config the plugin to N-terminus to C-terminus (rainbow) style #110

Open
yyli2022 opened this issue Jun 25, 2024 · 1 comment
Open

Comments

@yyli2022
Copy link

hi, dear, i can't config the plugin to N-terminus to C-terminus (rainbow) style. what i can do?
there is my code. THX
` const options = {
"customData": { url: pdbPath, format: 'pdb' },
"sequencePanel": true,
"hideControls": true,
"bgColor": { r: 255, g: 255, b: 255 },
"alphafoldView": true,
visualStyle: 'cartoon', // cartoon | ball-and-stick | carbohydrate | ellipsoid | gaussian-surface | molecular-surface | point | putty | spacefill
hideStructure: ['het', 'water'],
loadMaps: true,
mapSettings: { '2fo-fc': { opacity: 0.8, wireframe: true } },
highlightColor: '#ffff00',
selectColor: '#77bbff',
lighting: 'metallic', // flat | matte | glossy | metallic | plastic

// BEHAVIOR
validationAnnotation: true,
domainAnnotation: true,
symmetryAnnotation: true,
// pdbeUrl: 'https://www.ebi.ac.uk/pdbe/',
// encoding: 'cif', // cif | bcif
lowPrecisionCoords: true,
selectInteraction: false,
granularity: 'chainInstances', // element | residue | chain | entity | model | operator | structure | elementInstances | residueInstances | chainInstances
subscribeEvents: true,

"defaultPreset": "all-models",
"superpositionParams": { matrixAccession: 'P08684', segment: 1, ligandView: true, ligandColor: { r: 255, g: 255, b: 50 } }

};`

@midlik
Copy link
Collaborator

midlik commented Aug 28, 2024

Hi, this is possible in PDBe Molstar version 3.3.0:

const options = {
    moleculeId: '1cbs',
    visualStyle: { type:'cartoon', color: 'sequence-id' },
};

If you want to keep default visual styles for ligands etc., you'll need to list style for each component individually (I admit it's a bit annoying):

const options = {
    moleculeId: '1cbs',
    visualStyle: {
        polymer: { type: 'cartoon', color: 'sequence-id' },
        het: { type: 'ball-and-stick', color: 'element-symbol' },
        water: { type: 'ball-and-stick', color: 'element-symbol' },
        carbs: { type: 'carbohydrate', color: 'carbohydrate-symbol' },
        nonStandard: { type: 'ball-and-stick', color: 'element-symbol' },
    },
};

Copy links for PDBe Molstar 3.3.0 from here: https://github.com/molstar/pdbe-molstar/wiki/1.-PDBe-Molstar-as-JS-plugin#1-include-the-style-and-script-files-of-the-library-in-your-web-page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants