|
@@ -152,7 +152,7 @@ THREE.PDBLoader.prototype = {
|
|
|
|
|
|
var bhash = {};
|
|
|
|
|
|
- var x, y, z, e;
|
|
|
+ var x, y, z, index, e;
|
|
|
|
|
|
// parse
|
|
|
|
|
@@ -165,6 +165,7 @@ THREE.PDBLoader.prototype = {
|
|
|
x = parseFloat( lines[ i ].substr( 30, 7 ) );
|
|
|
y = parseFloat( lines[ i ].substr( 38, 7 ) );
|
|
|
z = parseFloat( lines[ i ].substr( 46, 7 ) );
|
|
|
+ index = parseInt( lines[ i ].substr( 6, 5 ) ) - 1;
|
|
|
|
|
|
e = trim( lines[ i ].substr( 76, 2 ) ).toLowerCase();
|
|
|
|
|
@@ -174,7 +175,7 @@ THREE.PDBLoader.prototype = {
|
|
|
|
|
|
}
|
|
|
|
|
|
- atoms.push( [ x, y, z, CPK[ e ], capitalize( e ) ] );
|
|
|
+ atoms[index] = [ x, y, z, CPK[ e ], capitalize( e ) ];
|
|
|
|
|
|
if ( histogram[ e ] === undefined ) {
|
|
|
|