|
@@ -303,10 +303,7 @@ const TrajectoryFromMmCif = PluginStateTransform.BuiltIn({
|
|
|
const header = params.blockHeader || a.data.blocks[0].header;
|
|
|
const block = a.data.blocks.find(b => b.header === header);
|
|
|
if (!block) throw new Error(`Data block '${[header]}' not found.`);
|
|
|
- const models = block.categoryNames.includes('chem_comp_atom') ? await trajectoryFromCCD(block).runInContext(ctx) : await trajectoryFromMmCIF(block).runInContext(ctx);
|
|
|
- if (models.frameCount === 0) throw new Error('No models found.');
|
|
|
- const props = trajectoryProps(models);
|
|
|
- return new SO.Molecule.Trajectory(models, props);
|
|
|
+ trajectory = block.categoryNames.includes('chem_comp_atom') ? await trajectoryFromCCD(block).runInContext(ctx) : await trajectoryFromMmCIF(block).runInContext(ctx);
|
|
|
}
|
|
|
if (trajectory.frameCount === 0) throw new Error('No models found.');
|
|
|
const props = trajectoryProps(trajectory);
|