@@ -1667,8 +1667,7 @@ export const ProteinViewer = forwardRef<ProteinViewerRef, ProteinViewerProps>(({
16671667 if ( dataSource === 'pubchem' && cleanId . length < 1 ) return null ;
16681668
16691669 let url = getStructureUrl ( cleanId , dataSource ) ;
1670- // Request Biological Unit 1 for proper viral/assembly visualization
1671- let loadParams : any = { defaultRepresentation : false , assembly : 'bu1' } ;
1670+ let loadParams : any = { defaultRepresentation : false } ;
16721671
16731672 // Add extension hint for NGL if needed
16741673 if ( dataSource === 'pubchem' ) loadParams . ext = 'sdf' ;
@@ -2420,7 +2419,7 @@ export const ProteinViewer = forwardRef<ProteinViewerRef, ProteinViewerProps>(({
24202419 }
24212420
24222421 // Handle "Force Element" for single chains/chemicals when default 'chainid' is picked
2423- const chainCount = component . structure && component . structure . chainStore ? component . structure . chainStore . count : 0 ;
2422+ const chainCount = component . structure ? component . structure . chainStore . count : 0 ;
24242423 if ( finalColor === 'chainid' && ( chainCount <= 1 || dataSource === 'pubchem' ) ) {
24252424 finalColor = 'element' ;
24262425 }
@@ -2579,11 +2578,9 @@ export const ProteinViewer = forwardRef<ProteinViewerRef, ProteinViewerProps>(({
25792578 // Fix: High Contrast for Chains
25802579 // If coloring by chain, ignore the global aesthetic palette (often monotonic like Magma)
25812580 // and force a high-contrast Rainbow (Spectral) to ensure distinct chain colors.
2582- // If coloring by chain, ignore the global aesthetic palette (often monotonic like Magma)
2583- // and force a high-contrast Rainbow (Spectral) to ensure distinct chain colors.
25842581 if ( finalColor === 'chainindex' ) {
25852582 params . colorScale = 'Spectral' ;
2586- } else if ( scale && Array . isArray ( scale ) && scale . length > 0 ) {
2583+ } else if ( scale && scale . length > 0 ) {
25872584 params . colorScale = scale ;
25882585 }
25892586
0 commit comments