Open yyli2022 opened 4 months ago
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
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
};`