Skip to content

Commit

Permalink
Assign initial value to grid and modelData
Browse files Browse the repository at this point in the history
  • Loading branch information
prajwalkulkarni committed Jan 26, 2024
1 parent 7f98d2e commit ca7ecbd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/parsers/utils/assignBonds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,18 @@ export function assignBonds(atoms: AtomSpec[]) {
if (!atoms[i].index) atoms[i].index = i;
}

let grid: {
const grid: {
x: {
y: {
z: AtomSpec[];
};
};
} = {
x: {
y: {
z: [],
},
},
};

for (let index = 0; index < atoms.length; index++) {
Expand Down
2 changes: 1 addition & 1 deletion src/parsers/utils/getSinglePDB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function getSinglePDB(
const computeStruct = !options.noComputeSecondaryStructure;
const noAssembly = !options.doAssembly; // don't assemble by default
const selAltLoc = options.altLoc ? options.altLoc : "A"; //default alternate location to select if present
let modelData: { symmetries: Matrix4[]; cryst: Cryst };
const modelData: { symmetries: Matrix4[]; cryst: Cryst } = {symmetries:[], cryst: undefined};
//atom name
let atom: string;
let remainingLines = [];
Expand Down

0 comments on commit ca7ecbd

Please sign in to comment.