File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
web-conexs-client/src/components Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ export default function React3dMol(props: Molecule3DProps) {
40
40
41
41
const viewer = mol3d . createViewer ( moleculeViewer . current , {
42
42
backgroundColor : props . color ,
43
+ defaultcolors : mol3d . elementColors . Jmol ,
43
44
} ) ;
44
45
45
46
if ( props . orbital ) {
@@ -97,11 +98,16 @@ export default function React3dMol(props: Molecule3DProps) {
97
98
if ( props . labelledAtom != undefined ) {
98
99
viewer . addLabel (
99
100
"*" ,
100
- { backgroundOpacity : 0 , fontSize : 28 } ,
101
+ { backgroundOpacity : 0 , fontSize : 18 } ,
101
102
{ index : props . labelledAtom }
102
103
) ;
103
-
104
-
104
+ const invertColor = function ( atom ) {
105
+ return ( 0xffffff - atom . color ) | 0xff000000 ;
106
+ } ;
107
+ viewer . setStyle (
108
+ { index : props . labelledAtom } ,
109
+ { sphere : { colorfunc : invertColor , radius : 0.6 } }
110
+ ) ;
105
111
}
106
112
} else if ( props . moleculedata ) {
107
113
const xyz = moleculeInputToXYZ ( props . moleculedata ) ;
You can’t perform that action at this time.
0 commit comments