-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support comma-separated list of files as input #10
base: master
Are you sure you want to change the base?
Conversation
@arose @JonStargaryen @bioinsilico @buzzcrackle any progress with this? the PR looks good |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry this flew under the radar.
files.forEach(async file => { | ||
await renderFile(file); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
files.forEach(async file => { | |
await renderFile(file); | |
}); | |
for (const file in files) { | |
await renderFile(file); | |
}); |
Need a normal loop here so the await
does what it's supposed to. What you did would execute all the renders in parallel which you don't really want as this is a single threaded environment and you would also likely run out of memory if the input list was really long.
}); | ||
} | ||
|
||
async function renderFile(filePath: string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async function renderFile(filePath: string) { | |
async function renderFile(filePath: string, renderer: ImageRenderer) { |
and declare const renderer = new ImageRenderer(args.width, args.height, args.format, args.plddt, new FocusFirstResidue());
in the main
function. This will reuse the renderer for all the renders and should work out of the box sinde the render function always calls this.canvas3d.clear();
at the end.
@arose @JonStargaryen @bioinsilico @buzzcrackle can you please revisit this? |
No description provided.