biochem-fan / GLmol

A molecular viewer written in Javascript and WebGL
73 stars 28 forks source link

Visualization not changing from spheres to ball and stick #20

Open lucasgpmoreira opened 10 months ago

lucasgpmoreira commented 10 months ago

I want to make ball and stick as default, but when i click apply nothing happens. i tried even change this part of the code to just this.drawBondsAsStick(target, hetatm, this.cylinderRadius / 2.0, this.cylinderRadius, true, true, 0.3); but nothing happend

   if ($(idHeader + 'showHetatms').attr('checked')) {
      var hetatmMode = $(idHeader + 'hetatm').val();
      if (hetatmMode == 'stick') {
         this.drawBondsAsStick(target, hetatm, this.cylinderRadius, this.cylinderRadius, true);
      } else if (hetatmMode == 'sphere') {
         this.drawAtomsAsSphere(target, hetatm, this.sphereRadius);
      } else if (hetatmMode == 'line') {
         this.drawBondsAsLine(target, hetatm, this.curveWidth);
      } else if (hetatmMode == 'icosahedron') {
         this.drawAtomsAsIcosahedron(target, hetatm, this.sphereRadius);
     } else if (hetatmMode == 'ballAndStick') {
         this.drawBondsAsStick(target, hetatm, this.cylinderRadius / 2.0, this.cylinderRadius, true, false, 0.3);
     } else if (hetatmMode == 'ballAndStick2') {
         this.drawBondsAsStick(target, hetatm, this.cylinderRadius / 2.0, this.cylinderRadius, true, true, 0.3);
     }

   }

don't even the background changes to white when i click on apply button.

biochem-fan commented 10 months ago

Are your molecules really "HETATM"s in the PDB file? The above does not apply to "ATOM" records.

Thank you very much for your interest in GLmol but this project is no longer actively maintained. I suggest you to use more modern WebGL based molecular viewers, for example Mol*.