diff --git a/.gitmodules b/.gitmodules index 651c29c15b3f775b4be5e03a63569bb37c8395a2..2b59288fe8e7be45e41debdf2f41df19349a4c86 100644 --- a/.gitmodules +++ b/.gitmodules @@ -62,6 +62,3 @@ [submodule "dependencies/parsers/example"] path = dependencies/parsers/example url = https://github.com/nomad-coe/nomad-parser-example.git -[submodule "dependencies/nomad-aitoolkit"] - path = dependencies/nomad-aitoolkit - url = https://github.com/FAIRmat-NFDI/nomad-aitoolkit.git diff --git a/.vscode/settings.json b/.vscode/settings.json index baa0321cce049b038bbbbd12ecb4f9f1713870f2..ed89996d7ba4a032a7ec20ae23b30e6544fa1ae7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -106,6 +106,8 @@ "python.testing.pytestPath": "pytest", "python.testing.pytestArgs": ["tests"], "python.testing.unittestEnabled": false, - "editor.defaultFormatter": "charliermarsh.ruff", - "editor.formatOnSave": true, + "[python]": { + "editor.defaultFormatter": "charliermarsh.ruff", + "editor.formatOnSave": true + } } diff --git a/Dockerfile b/Dockerfile index 521da36284128ad7a60792f06c3b523847257268..3c9eb29171fef04fee9ef8862112bfd80a196576 100644 --- a/Dockerfile +++ b/Dockerfile @@ -130,7 +130,7 @@ RUN pip install ".[parsing,infrastructure,dev]" # Install default plugins. TODO: This can be removed once we have a proper # distribution project. -RUN ./scripts/install_default_plugins.sh \ +RUN ./scripts/install_default_plugins.sh RUN ./scripts/generate_docs_artifacts.sh \ && mkdocs build \ @@ -179,7 +179,7 @@ RUN pip install nomad-lab-*.tar.gz # Install default plugins. TODO: This can be removed once we have a proper # distribution project. COPY scripts/install_default_plugins.sh ./scripts/install_default_plugins.sh -RUN ./scripts/install_default_plugins.sh \ +RUN ./scripts/install_default_plugins.sh # Reduce the size of the packages RUN find /usr/local/lib/python3.9/ -type d -name 'tests' ! -path '*/networkx/*' -exec rm -r '{}' + \ diff --git a/dependencies/nomad-aitoolkit b/dependencies/nomad-aitoolkit deleted file mode 160000 index bced0fceeb691e3ecef1f4b62c198edf8d137484..0000000000000000000000000000000000000000 --- a/dependencies/nomad-aitoolkit +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bced0fceeb691e3ecef1f4b62c198edf8d137484 diff --git a/gui/src/components/About.js b/gui/src/components/About.js index 9dde13e01910b09caee668af346dd2340e7b3a11..a5182ae90a5d13fcad8875c1e5d4928940916eca 100644 --- a/gui/src/components/About.js +++ b/gui/src/components/About.js @@ -20,7 +20,7 @@ import { ReactComponent as AboutSvg } from '../images/about.svg' import PropTypes from 'prop-types' import Markdown from './Markdown' import { isNil } from 'lodash' -import { appBase, debug, aitoolkitEnabled, encyclopediaBase, parserMetadata, toolkitMetadata as tutorials } from '../config' +import { appBase, debug, encyclopediaBase, parserMetadata, toolkitMetadata as tutorials } from '../config' import { Button, Card, @@ -347,13 +347,6 @@ export default function About() { window.location.href = encyclopediaBase }) } - makeClickable('toolkit', () => { - if (aitoolkitEnabled) { - history.push('/aitoolkit/main') - } else { - window.location.href = 'https://nomad-lab.eu/tools/AItutorials' - } - }) makeClickable('search', () => { history.push('/search') }) diff --git a/gui/src/components/aitoolkit/AIToolkitPage.js b/gui/src/components/aitoolkit/AIToolkitPage.js deleted file mode 100644 index 7b1efe90f48cbb740bd0823b621a4b30892744b5..0000000000000000000000000000000000000000 --- a/gui/src/components/aitoolkit/AIToolkitPage.js +++ /dev/null @@ -1,507 +0,0 @@ -/* eslint-disable react/no-unescaped-entities */ -/* - * Copyright The NOMAD Authors. - * - * This file is part of NOMAD. See https://nomad-lab.eu for further info. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import React from 'react' -import { - Grid, - Box, - Button, - Typography, - Popover, - IconButton, - makeStyles -} from '@material-ui/core' -import { Link } from 'react-router-dom' -import ExpandMoreIcon from '@material-ui/icons/ExpandMore' -import IconQuery from '../../images/AIT_ico_bb_query.svg' -import IconReplicate from '../../images/AIT_ico_bb_replicate.svg' -import IconTutorial from '../../images/AIT_ico_bb_tutorial.svg' -import IconWork from '../../images/AIT_ico_bb_work.svg' -import IconQuery2 from '../../images/AIT_ico_bp_query.svg' -import IconReplicate2 from '../../images/AIT_ico_bp_replicate.svg' -import IconTutorial2 from '../../images/AIT_ico_bp_tutorial.svg' -import IconWork2 from '../../images/AIT_ico_bp_work.svg' -import ArrowIcon from '../../images/AIT_ico_bd_link_go_to.svg' -import FigureAI from '../../images/AIT_illu_AIT.svg' -import YouTubeEmbed from '../YouTubeEmbed' -import ScrollButton from '../buttons/ScrollButton' -import InfoIcon from '../../images/AIT_ico_bd_info_circle.svg' -import Background from '../../images/AIT_bg_title.jpg' -import ImgNatRev from '../../images/AIT_slide_nature.png' - -const useStyles = makeStyles(theme => ({ - root: { - margin: theme.spacing(3), - width: '100%', - marginLeft: 'auto', - marginRight: 'auto', - maxWidth: '1920px', - marginBottom: '150px' - }, - background: { - position: 'relative', - backgroundImage: `url(${Background})`, - height: '840px', - marginTop: '-50px', - zIndex: 0 - }, - boxIcons: { - width: '1000px', - margin: 'auto', - marginTop: '-150px' - }, - title: { - fontWeight: theme.typography.fontWeightMedium, - fontSize: '55px', - margin: 'auto', - textAlign: 'center', - align: 'center', - marginTop: '100px', - width: '650px', - height: '140px', - letterSpacing: 0, - lineHeight: '62px', - color: 'white' - }, - deck: { - letterSpacing: 0, - marginTop: '-170px', - wordSpacing: '5px', - lineHeight: '42px', - color: 'white', - fontSize: '35px', - margin: 'auto', - textAlign: 'center', - align: 'center', - left: '736px', - top: '270px', - width: '550px', - height: '140px' - }, - topIcon: { - width: '180px', - marginBottom: '-10px' - }, - topButton: { - fontWeight: theme.typography.fontWeightMedium, - backgroundColor: 'white', - borderRadius: '30px', - textTransform: 'none', - marginTop: '-38px', - fontSize: '20px', - lineHeight: '20px', - color: '#2A3C67', - textAlign: 'center', - align: 'center', - paddingTop: '15px', - paddingBottom: '15px', - paddingRight: '35px', - paddingLeft: '15px' - }, - arrowGrid: { - marginTop: '-32px', - marginLeft: '-45px' - }, - scrollButton: { - position: 'absolute', - bottom: '70px', - left: theme.spacing(2), - color: '#2A3C67', - backgroundColor: theme.palette.background.paper, - '&:hover, &.Mui-focusVisible': { - color: '#2A3C67', - backgroundColor: theme.palette.background.paper - } - }, - body: { - width: '1052px', - margin: theme.spacing(3), - marginLeft: 'auto', - marginRight: 'auto' - }, - highlightedText: { - fontWeight: theme.typography.fontWeightMedium, - color: '#00DFE0', - fontSize: '35px', - width: '518px', - lineHeight: '42px', - marginTop: '80px' - }, - bodyText: { - color: '#2A3C67', - lineHeight: '30px', - fontSize: '22px', - width: '607px', - marginTop: '40px' - }, - boxIconsBottom: { - width: '1000px', - margin: 'auto', - marginTop: '50px' - }, - buttonBottom: { - fontWeight: theme.typography.fontWeightMedium, - backgroundColor: '#F3F2F5', - fontSize: '20px', - lineHeight: '20px', - color: '#2A3C67', - textAlign: 'center', - align: 'center', - borderRadius: '30px', - width: '207px', - height: '70px', - textTransform: 'none' - }, - iconsBottom: { - width: '200px' - }, - toolTipText: { - width: '400px', - height: '520px', - marginRight: '15px', - marginLeft: '15px', - marginTop: '10px' - } -})) - -export default function AIToolkitPage() { - const styles = useStyles() - - const [anchorEl, setAnchorEl] = React.useState(null) - const handleClick = (event) => { - setAnchorEl(event.currentTarget) - } - const handleClose = () => { - setAnchorEl(null) - } - const open = Boolean(anchorEl) - const id = open ? 'simple-popover' : undefined - - return <Grid container spacing={2} className={styles.root}> - <Grid container className={styles.background}> - <ScrollButton scrollAmount={840} className={styles.scrollButton}> - <ExpandMoreIcon/> - </ScrollButton> - <Grid item xs={12} > - <Typography className={styles.title}> - Artificial-Intelligence Tools for Materials Science - </Typography> - </Grid> - <Grid item xs={12}> - <Typography className={styles.deck}> - Find new Patterns and Trends in Materials Science Big Data - </Typography> - </Grid> - <Grid container spacing={1} className={styles.boxIcons}> - <Grid item xs={3} > - <IconButton href='https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/query_nomad_archive.ipynb'> - <img - src={IconQuery} - className={styles.topIcon} - style={{zIndex: 2, position: 'relative'}} - alt='Query Archive icon' - /> - </IconButton> - <Grid container spacing={0}> - <Grid item xs={11}> - <Typography - className={styles.topButton} - style={{zIndex: 1, position: 'relative'}} - > - Query the Archive - </Typography> - </Grid> - <Grid item xs={1} className={styles.arrowGrid}> - <IconButton href='https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/query_nomad_archive.ipynb'> - <img - src={ArrowIcon} - style={{width: '20px', zIndex: 4, position: 'relative'}} - alt = 'Arrow Icon' - /> - </IconButton> - </Grid> - </Grid> - </Grid> - <Grid item xs={3} > - <IconButton to="tutorials" component={Link}> - <img - alt='Tutorials icon' - src={IconTutorial} - className={styles.topIcon} - style={{zIndex: 2, position: 'relative'}} - /> - </IconButton> - <Grid container spacing={0}> - <Grid item xs={11}> - <Typography - className={styles.topButton} - style={{zIndex: 1, position: 'relative'}} - > - View tutorials - </Typography> - </Grid> - <Grid item xs={1} className={styles.arrowGrid}> - <IconButton to="tutorials" component={Link}> - <img - alt='Arrow Icon' - src={ArrowIcon} - style={{width: '20px', zIndex: 4, position: 'relative'}} - /> - </IconButton> - </Grid> - </Grid> - </Grid> - <Grid item xs={3} > - <IconButton to="reproduce" component={Link}> - <img - alt='Reproduce icon' - src={IconReplicate} - className={styles.topIcon} - style={{zIndex: 2, position: 'relative'}} - /> - </IconButton> - <Grid container spacing={0}> - <Grid item xs={11}> - <Typography - className={styles.topButton} - style={{zIndex: 1, position: 'relative'}} - > - Published results - </Typography> - </Grid> - <Grid item xs={1} className={styles.arrowGrid}> - <IconButton to="reproduce" component={Link}> - <img - alt='Arrow icon' - src={ArrowIcon} - style={{width: '20px', zIndex: 4, position: 'relative'}} - /> - </IconButton> - </Grid> - </Grid> - </Grid> - <Grid item xs={3} > - <Grid container > - <Grid item xs={11}> - <IconButton href="https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks"> - <img - alt='Get to work icon' - src={IconWork} - className={styles.topIcon} - style={{zIndex: 2, position: 'relative'}} - /> - </IconButton> - <Grid container spacing={0}> - <Grid item xs={11}> - <Typography - className={styles.topButton} - style={{zIndex: 1, position: 'relative'}} - > - Get to work - </Typography> - </Grid> - <Grid item xs={1} className={styles.arrowGrid}> - <IconButton href="https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks"> - <img - alt='Arrow cion' - src={ArrowIcon} - style={{width: '20px', zIndex: 4, position: 'relative'}} /> - </IconButton> - </Grid> - </Grid> - </Grid> - <Grid item xs={1} style={{marginTop: '161px', marginLeft: '-20px'}}> - <IconButton aria-describedby={id} variant="contained" onClick={handleClick}> - <img alt='Info icon' src={InfoIcon} /> - </IconButton> - <Popover - id={id} - open={open} - anchorEl={anchorEl} - onClose={handleClose} - anchorOrigin={{ - vertical: 'bottom', - horizontal: 'left' - }} - > - <Typography className={styles.toolTipText}> - By clicking on the 'Get to work' button you will access a - personal space that is available to each NOMAD user. After - logging in, you will see a 'tutorials' and 'work' directory. - The 'tutorials' directory contains all notebooks available in - the AI toolkit, while the 'work' directory offers some space - to save personal work. When you are in the 'work' directory, - click on the 'new' icon on the top right and then select - 'Python 3'. This will create a Jupyter notebook that is - stored in the AI toolkit and can be reaccessed and iteratively - modified by the user. All packages and software installed in the AI - toolkit are also available in the 'work' directory, that - makes it possible to employ the same code syntax used in - each tutorial contained in the AI toolkit for your own project. - For example, you can deploy any of the methodologies described in - tutorials on a different dataset. You can also upload your own data with - the 'Upload' button (via the menu bar on top, under the 'Publish' menu), - or directly access datasets in the NOMAD Archive. Make sure to learn - how to access the data in the NOMAD Archive, which is explained in the - tutorial accessible from the 'Query the Archive' button. - </Typography> - </Popover> - </Grid> - </Grid> - </Grid> - </Grid> - </Grid> - <Grid container spacing={1} className={styles.body}> - <Grid item xs={8} > - <Typography className={styles.highlightedText}> - What is the NOMAD Artificial-Intelligence Toolkit? - </Typography> - <Typography className={styles.bodyText}> - The preparation, synthesis, and characterization of new materials is a - complex and costly aspect of materials design. The number of possible - materials is practically infinite, about 200,000 materials are “known” - to exist. But the basic properties (e.g., optical gap, elasticity - constants, plasticity, piezoelectric tensors, conductivity, etc.) have - been determined for very few of them. NOMAD develops and provides a - big set of tools - the Artificial-Intelligence Toolkit - using the - latest artificial-intelligence approaches (including machine-learning, - compressed sensing, and data mining) that make it possible to sort all - available material data, to identify correlations and structures, and - to detect trends and anomalies. Thus, the Artificial Intelligence Toolkit - enables scientists and engineers to decide which materials are useful for - specific applications or which new materials should be the focus of future - studies. - </Typography> - </Grid> - <Grid item xs={4}> - <img alt='AI toolkit logo' src={FigureAI} style={{marginTop: '150px'}}/> - - </Grid> - <Grid item xs={8} > - <Typography className={styles.highlightedText}> - How to get started - </Typography> - <Typography className={styles.bodyText}> - Introduction to the scope of the NOMAD Artificial-Intelligence toolkit. - </Typography> - <div className="App" style={{marginTop: '30px'}}> - <YouTubeEmbed embedId="v_Ie5TPXrd0" /> - </div> - <Grid item xs={8}> - <Typography className={styles.bodyText}> - The NOMAD Artificial-Intelligence Toolkit is very accessible. Watch this video and - learn more about its features. - </Typography> - </Grid> - </Grid> - <div className="App" style={{marginTop: '30px'}}> - <YouTubeEmbed embedId="7R4EHsSRork" /> - </div> - <Grid item xs={8} > - <Typography className={styles.highlightedText}> - Read about us! - </Typography> - <Typography className={styles.bodyText}> - By clicking on the image below, you will access a Nature Reviews paper - which gives an introduction to the NOMAD Artificial-Intelligence Toolkit. - </Typography> - <IconButton - href='https://www.nature.com/articles/s42254-021-00373-8' - style={{marginRight: '0px', marginTop: '20px'}} - > - <img alt='Nature logo' src={ImgNatRev} - style={{width: '550px', - marginTop: '15px', - marginLeft: '-10px' }} - /> - </IconButton> - </Grid> - - <Grid item xs={8} > - <Typography className={styles.highlightedText}>Access the tutorials </Typography> - <Typography className={styles.bodyText}> - Ready to start? Click on one of the options below. If you're new, we - suggest starting with the tutorials. - </Typography> - </Grid> - </Grid> - - <Grid container spacing={1} className={styles.boxIconsBottom}> - <Grid item xs={3}> - <IconButton href='https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/query_nomad_archive.ipynb'> - <img alt='Query the Archive logo' src={IconQuery2} className={styles.iconsBottom}/> - </IconButton> - </Grid> - <Grid item xs={3}> - <img alt='Tutorials logo' src={IconTutorial2} className={styles.iconsBottom}/> - </Grid> - <Grid item xs={3}> - <img alt='Reroduce logo' src={IconReplicate2} className={styles.iconsBottom}/> - </Grid> - <Grid item xs={3}> - <img alt='Get to work log' src={IconWork2} className={styles.iconsBottom}/> - </Grid> - <Grid item xs={3}> - <Button - href='https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/query_nomad_archive.ipynb' - className={styles.buttonBottom} - endIcon={<img alt='Arrow icon' src={ArrowIcon}/>} - > - <Box className={styles.fieldText} > - Query the Archive - </Box> - </Button> - </Grid> - <Grid item xs={3} > - <Button - component={Link} - to="tutorials" - className={styles.buttonBottom} - endIcon={<img alt='Arrow icon' src={ArrowIcon}/>} - > - <Box className={styles.fieldText} > - View tutorials - </Box> - </Button> - </Grid> - <Grid item xs={3}> - <Button - component={Link} - to="reproduce" - className={styles.buttonBottom} - endIcon={<img alt='Arrow icon' src={ArrowIcon}/>} - > - <Box className={styles.fieldText}> - Published results - </Box> - </Button> - </Grid> - <Grid item xs={3}> - <Button - href='https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks' - className={styles.buttonBottom} - endIcon={<img alt='Arrow icon' src={ArrowIcon}/>} - > - <Box className={styles.fieldText}> - Get to work - </Box> - </Button> - </Grid> - </Grid> - </Grid> -} diff --git a/gui/src/components/aitoolkit/AccordionsList.js b/gui/src/components/aitoolkit/AccordionsList.js deleted file mode 100644 index 085972d20fd8176848731222a30bbc1a920d866f..0000000000000000000000000000000000000000 --- a/gui/src/components/aitoolkit/AccordionsList.js +++ /dev/null @@ -1,300 +0,0 @@ -/* - * Copyright The NOMAD Authors. - * - * This file is part of NOMAD. See https://nomad-lab.eu for further info. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and - * limitations under the License. - */ - -import React from 'react' -import PropTypes from 'prop-types' -import { - Divider, - Typography, - Link, - AccordionActions, - Button, - Grid, - makeStyles -} from '@material-ui/core' -import MuiAccordion from '@material-ui/core/Accordion' -import MuiAccordionSummary from '@material-ui/core/AccordionSummary' -import MuiAccordionDetails from '@material-ui/core/AccordionDetails' -import { styled } from '@material-ui/core/styles' -import ArrowForwardIosSharpIcon from '@material-ui/icons/ArrowForwardIosSharp' -import ExpandMoreIcon from '@material-ui/icons/ExpandMore' -import Markdown from '../Markdown' -import { StringParam, useQueryParam } from 'use-query-params' -import AccessIcon from '../../images/AIT_ico_bd_link_external_big.svg' -import WatchIcon from '../../images/AIT_ico_bd_youtube.svg' -import PdfIcon from '../../images/AIT_ico_bd_link_pdf.svg' -import DoiIcon from '../../images/AIT_ico_bd_link_doi.svg' - -const NotebookButton = React.memo(function NotebookButton({...props}) { - // TODO this button has to be implemented and send users to the respective AItoolkit - // notebook on north. - return <Button {...props} /> -}) -NotebookButton.propTypes = { - metadata: PropTypes.Object, - children: PropTypes.oneOfType([ - PropTypes.arrayOf(PropTypes.node), - PropTypes.node - ]) -} - -const useStyles = makeStyles(theme => ({ - tutorialTitleGrid: { - marginRight: '40px' - }, - tutorialTitleText: { - fontWeight: theme.typography.fontWeightMedium, - fontSize: '28px', - color: '#2A3C67', - lineHeight: '30px' - }, - fieldText: { - color: '#2A3C67' - }, - linkAuthors: { - color: '#2A3C67', - cursor: 'pointer', - lineHeight: '20px', - fontSize: '16px' - }, - tutorialDescriptionGrid: { - marginLeft: '50px' - }, - tutorialDescriptionText: { - color: '#2A3C67', - fontSize: '18px' - }, - keywordsGrid: { - marginLeft: '80px' - }, - linkKeywords: { - border: '1.5px solid #00DFE0', - lineHeight: '35px', - color: '#2A3C67', - cursor: 'pointer', - fontStyle: 'normal', - fontSize: '16px' - }, - tutorialActions: { - marginLeft: '50px' - }, - tutorialResources: { - marginTop: '-17px', - marginLeft: '-6px' - } -})) - -const Accordion = styled((props) => ( - <MuiAccordion {...props} /> -))(({ theme }) => ({ - backgroundColor: theme.palette.background.default, - borderBottom: '13px solid #7FEFEF' -})) - -const AccordionSummary = styled((props) => ( - <MuiAccordionSummary - expandIcon={<ArrowForwardIosSharpIcon sx={{ fontSize: '0.9rem' }} />} - {...props} - /> -))(({ theme }) => ({ - flexDirection: 'row-reverse', - '& .MuiAccordionSummary-expandIconWrapper.Mui-expanded': { - transform: 'rotate(90deg)' - }, - '& .MuiAccordionSummary-content': { - marginLeft: theme.spacing(1), - marginTop: '20px', - marginBottom: '20px' - } -})) - -const AccordionDetails = styled(MuiAccordionDetails)(({ theme }) => ({ - padding: theme.spacing(2) -})) - -function AccordionsList(props) { - const styles = useStyles() - const [expanded, setExpanded] = useQueryParam('expanded', StringParam) - return ( - props.tutorials_list.map(tutorial => ( - props.filter(tutorial) && - <div key={tutorial.title} > - <Accordion - key={tutorial.key} - expanded={expanded === tutorial.key} - onChange={() => setExpanded(expanded === tutorial.key ? null : tutorial.key)} - elevation={0} - > - <AccordionSummary expandIcon={<ExpandMoreIcon />}> - <Grid container spacing={1} > - <Grid item xs={7} className={styles.tutorialTitleGrid} > - <Typography className={styles.tutorialTitleText}> - {tutorial.title} - </Typography> - </Grid> - <Grid item xs={4}> - <Typography className={styles.fieldText}> - {<b>Authors: </b> } - {tutorial.authors - .map(name => { - const label = name.split(',').reverse().join(' ') - return <Link - className={styles.linkAuthors} - key={name} - onClick={() => { - props.setQueryParameters({ - ...props.emptyQuery, - author: props.queryParameters.author === name ? null : name - }) - props.setAuthor(name) - }} - > - {label} - </Link> - }).reduce((prev, curr) => [prev, ' | ', curr]) - } - </Typography> - </Grid> - </Grid> - </AccordionSummary> - <AccordionDetails > - <Grid container spacing={4}> - <Grid item xs={6} className={styles.tutorialDescriptionGrid}> - <Markdown className={styles.tutorialDescriptionText}> - {tutorial.description} - </Markdown> - </Grid> - <Grid item xs={4} className={styles.keywordsGrid}> - <Typography className={styles.fieldText}> - <b>AI methods</b>: - </Typography> - <Typography> - {tutorial.labels.ai_methods - .map(method => ( - <Link - className={styles.linkKeywords} - key={method} - onClick={() => { - props.setQueryParameters({ - ...props.emptyQuery, - method: props.queryParameters.method === method ? null : method - }) - props.setMethod(method) - }} - > - {method} - </Link> - )).reduce((prev, curr) => [prev, ' ', curr]) - } - </Typography> - <Typography className={styles.fieldText}> - <b>System</b>: - </Typography> - <Typography> - {tutorial.labels.application_system - .map(system => ( - <Link - className={styles.linkKeywords} - key={system} - onClick={() => { - props.setQueryParameters({ - ...props.emptyQuery, - system: props.queryParameters.system === system ? null : system - }) - props.setSystem(system) - }} - > - {system} - </Link> - )).reduce((prev, curr) => [prev, ' ', curr]) - } - </Typography> - </Grid> - </Grid> - </AccordionDetails> - <AccordionActions> - <Grid container spacing={4}> - <Grid item xs={7} className={styles.tutorialActions}> - <Grid container spacing={0}> - <Grid item xs={5}> - <NotebookButton - metadata={tutorial} - startIcon={<img alt='Access icon' src={AccessIcon}></img>} - > - <Typography className={styles.fieldText} > - <b>Access tutorial</b> - </Typography> - </NotebookButton> - </Grid> - <Grid item xs={5} > - <div> - { tutorial.link_video && <Button - width='10px' - color='#2A3C67' - href={tutorial.link_video} - target="tutorial" - startIcon={<img alt='Watch icon' src={WatchIcon}></img>} - > - <Typography className={styles.fieldText} > - <b>Watch video</b> - </Typography> - </Button>} - </div> - </Grid> - </Grid> - </Grid> - {tutorial.link_paper && - <Grid item xs={4} className={styles.tutorialResources}> - <Grid item xs={12}> - <Typography className={styles.fieldText}> - <b>Additional Resources</b>: - </Typography> - </Grid> - <Grid container spacing={0}> - <Grid item xs={2} > - <div> - {tutorial.link_paper && <Button - color='#2A3C67' - href={tutorial.link_paper} - target="tutorial" - startIcon={<img alt='DOI icon' src={DoiIcon}></img>}> - </Button>} - </div> - </Grid> - <Grid item xs={2}> - <div> - {tutorial.link_paper && <Button - color='#2A3C67' - href={tutorial.link_paper} - target="tutorial" - startIcon={<img alt='PDF icon' src={PdfIcon}/>}> - </Button>} - </div> - </Grid> - </Grid> - </Grid> - } - </Grid> - </AccordionActions> - <Divider /> - </Accordion> - </div> - ))) -} - -export default AccordionsList diff --git a/gui/src/components/aitoolkit/CoursePage.js b/gui/src/components/aitoolkit/CoursePage.js deleted file mode 100644 index 4c1300f1e5d2dd064b67cd48259098a273d88926..0000000000000000000000000000000000000000 --- a/gui/src/components/aitoolkit/CoursePage.js +++ /dev/null @@ -1,454 +0,0 @@ -/* - * Copyright The NOMAD Authors. - * - * This file is part of NOMAD. See https://nomad-lab.eu for further info. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and - * limitations under the License. - */ -import React from 'react' -import { - Button, - Grid, - Typography, - Divider, - IconButton, - makeStyles, - AccordionActions - -} from '@material-ui/core' -import { Link } from 'react-router-dom' -import { StringParam, useQueryParam } from 'use-query-params' -import TutorialsIcon from '../../images/AIT_ico_bp_tutorial.svg' -import ArrowIcon from '../../images/AIT_ico_bd_link_go_to.svg' -import FigureAI from '../../images/AIT_illu_AIT.svg' -import tutorials from '../../courseAI.json' -import { aitoolkitEnabled } from '../../config' -import MuiAccordion from '@material-ui/core/Accordion' -import MuiAccordionSummary from '@material-ui/core/AccordionSummary' -import MuiAccordionDetails from '@material-ui/core/AccordionDetails' -import { styled } from '@material-ui/core/styles' -import ArrowForwardIosSharpIcon from '@material-ui/icons/ArrowForwardIosSharp' -import ExpandMoreIcon from '@material-ui/icons/ExpandMore' -import Markdown from '../Markdown' -import AccessIcon from '../../images/AIT_ico_bd_link_external_big.svg' -import WatchIcon from '../../images/AIT_ico_bd_youtube.svg' -import PdfIcon from '../../images/AIT_ico_bd_link_pdf.svg' -import DoiIcon from '../../images/AIT_ico_bd_link_doi.svg' - -export const useStyles = makeStyles(theme => ({ - root: { - margin: theme.spacing(3), - width: '100%', - marginLeft: 'auto', - marginRight: 'auto', - maxWidth: '1052px', - marginBottom: '150px' - }, - sectionIcon: { - marginTop: theme.spacing(3) - }, - sectionTitle: { - marginBottom: theme.spacing(1), - marginLeft: theme.spacing(2), - marginTop: '105px' - }, - title: { - color: '#2A3C67', - fontSize: '35px', - marginLeft: '-10px', - fontWeight: theme.typography.fontWeightMedium, - marginTop: '-70px' - }, - deck: { - color: '#2A3C67', - fontSize: '22px', - marginTop: '20px', - lineHeight: '30px', - marginLeft: '-10px', - width: '518px' - }, - icon: { - height: '371px', - marginTop: '-20px', - marginLeft: '100px' - }, - filter: { - fontWeight: theme.typography.fontWeightMedium, - color: '#2A3C67', - fontSize: '20px', - marginTop: '60px', - marginLeft: '0px' - }, - autocomplete: { - height: 'auto', - color: '#2A3C67', - border: '3px solid #00DFE0', - borderRadius: '10px 10px 10px 10px', - marginTop: '10px', - marginLeft: '0px', - width: '240px' - }, - tutorialsList: { - marginTop: '50px' - }, - textLevel: { - textAlign: 'left', - color: '#2A3C67', - fontSize: '22px', - height: '22px', - marginTop: '-16px' - }, - titleSecondary: { - fontWeight: 'bold', - color: '#00DFE0', - fontSize: '35px', - marginLeft: '-10px' - }, - bottomButton: { - color: '#F3F2F5', - backgroundColor: '#F3F2F5', - borderRadius: '30px', - width: '242px', - height: '70px', - textAlign: 'center', - align: 'center', - marginTop: '40px', - textTransform: 'none', - fontSize: '12pt', - lineHeight: '20px' - }, - bottomButtonText: { - color: '#2A3C67', - fontWeight: theme.typography.fontWeightMedium - }, - bottomIcon: { - marginTop: '80px', - marginLeft: '120px' - }, - tutorialTitleGrid: { - marginRight: '40px' - }, - tutorialTitleText: { - fontWeight: theme.typography.fontWeightMedium, - fontSize: '28px', - color: '#2A3C67', - lineHeight: '30px' - }, - fieldText: { - color: '#2A3C67' - }, - linkAuthors: { - color: '#2A3C67', - cursor: 'pointer', - lineHeight: '20px', - fontSize: '16px' - }, - tutorialDescriptionGrid: { - marginLeft: '50px' - }, - tutorialDescriptionText: { - color: '#2A3C67', - fontSize: '18px' - }, - keywordsGrid: { - marginLeft: '80px' - }, - linkKeywords: { - border: '1.5px solid #00DFE0', - lineHeight: '35px', - color: '#2A3C67', - cursor: 'pointer', - fontStyle: 'normal', - fontSize: '16px' - }, - tutorialActions: { - marginLeft: '50px' - }, - tutorialResources: { - marginTop: '-17px', - marginLeft: '-6px' - } -})) - -const Accordion = styled((props) => ( - <MuiAccordion {...props} /> -))(({ theme }) => ({ - backgroundColor: theme.palette.background.default, - borderBottom: '13px solid #7FEFEF' -})) - -const AccordionSummary = styled((props) => ( - <MuiAccordionSummary - expandIcon={<ArrowForwardIosSharpIcon sx={{ fontSize: '0.9rem' }} />} - {...props} - /> -))(({ theme }) => ({ - flexDirection: 'row-reverse', - '& .MuiAccordionSummary-expandIconWrapper.Mui-expanded': { - transform: 'rotate(90deg)' - }, - '& .MuiAccordionSummary-content': { - marginLeft: theme.spacing(1), - marginTop: '20px', - marginBottom: '20px' - } -})) - -const AccordionDetails = styled(MuiAccordionDetails)(({ theme }) => ({ - padding: theme.spacing(2) -})) - -export default function TutorialsPage() { - const styles = useStyles() - - const tutorials_list = tutorials.tutorials - - tutorials_list.forEach(tutorial => { - tutorial.key = tutorial.title.replace(/\W/gm, '_').toLowerCase() - }) - - function AccordionsList() { - const [expanded, setExpanded] = useQueryParam('expanded', StringParam) - return ( - tutorials_list.map(tutorial => ( - <div key={tutorial.title} > - <Accordion - key={tutorial.key} - expanded={expanded === tutorial.key} - onChange={() => setExpanded(expanded === tutorial.key ? null : tutorial.key)} - elevation={0} - > - <AccordionSummary expandIcon={<ExpandMoreIcon />}> - <Grid container spacing={1} > - <Grid item xs={7} className={styles.tutorialTitleGrid} > - <Typography className={styles.tutorialTitleText}> - {tutorial.title} - </Typography> - </Grid> - <Grid item xs={4}> - <Typography className={styles.fieldText}> - {<b>Lecturer: </b> } - {tutorial.lecturer - - } - </Typography> - </Grid> - </Grid> - </AccordionSummary> - <AccordionDetails > - <Grid container spacing={4}> - <Grid item xs={6} className={styles.tutorialDescriptionGrid}> - <Markdown className={styles.tutorialDescriptionText}> - {tutorial.description} - </Markdown> - </Grid> - <Grid item xs={4} className={styles.keywordsGrid}> - - {tutorial.notebook_name_1 && <><Typography className={styles.fieldText}> - <b>Notebook authors:</b> - </Typography><Typography> - {tutorial.authors_notebook_1 - .map(name => { - const label = name.split(',').reverse().join(' ') - return label - }).reduce((prev, curr) => [prev, ' | ', curr])} - </Typography> - <Button - href={tutorial.link_notebook_1} - target="tutorial" - startIcon={<img alt='Access icon' src={AccessIcon}></img>} - > - <Typography className={styles.fieldText} > - <b>Access notebook</b> - </Typography> - </Button> - </>} - {tutorial.notebook_name_2 && <><Typography className={styles.fieldText}> - <b>Notebook authors:</b> - </Typography><Typography> - {tutorial.authors_notebook_2 - .map(name => { - const label = name.split(',').reverse().join(' ') - return label - }).reduce((prev, curr) => [prev, ' | ', curr])} - </Typography> - <Button - href={tutorial.link_notebook_2} - target="tutorial" - startIcon={<img alt='Access icon' src={AccessIcon}></img>} - > - <Typography className={styles.fieldText} > - <b>Access notebook</b> - </Typography> - </Button> - </>} - </Grid> - </Grid> - </AccordionDetails> - <AccordionActions> - <Grid container spacing={4}> - <Grid item xs={7} className={styles.tutorialActions}> - <Grid container spacing={0}> - <Grid item xs={5}> - <Button - href={tutorial.link_video_1} - target="tutorial" - startIcon={<img alt='Watch icon' src={WatchIcon}></img>} - > - <Typography className={styles.fieldText} > - <b>Watch video 1</b> - </Typography> - </Button> - </Grid> - <Grid item xs={5} > - <div> - { tutorial.link_video_2 && <Button - width='10px' - color='#2A3C67' - href={tutorial.link_video_2} - target="tutorial" - startIcon={<img alt='Watch icon' src={WatchIcon}></img>} - > - <Typography className={styles.fieldText} > - <b>Watch video 2</b> - </Typography> - </Button>} - </div> - </Grid> - </Grid> - </Grid> - {tutorial.link_paper && - <Grid item xs={4} className={styles.tutorialResources}> - <Grid item xs={12}> - <Typography className={styles.fieldText}> - <b>Additional Resources</b>: - </Typography> - </Grid> - <Grid container spacing={0}> - <Grid item xs={2} > - <div> - {tutorial.link_paper && <Button - color='#2A3C67' - href={tutorial.link_paper} - target="tutorial" - startIcon={<img alt='DOI icon' src={DoiIcon}></img>}> - </Button>} - </div> - </Grid> - <Grid item xs={2}> - <div> - {tutorial.link_paper && <Button - color='#2A3C67' - href={tutorial.link_paper} - target="tutorial" - startIcon={<img alt='PDF icon' src={PdfIcon}/>}> - </Button>} - </div> - </Grid> - </Grid> - </Grid> - } - </Grid> - </AccordionActions> - <Divider /> - </Accordion> - </div> - ))) - } - - return <Grid container spacing={1} className={styles.root}> - <Grid container spacing={0} className={styles.Heading}> - <Grid item xs={6} className={styles.sectionTitle}> - <Grid container spacing={0}> - <Grid item xs={4} style={{marginTop: '-100px', marginLeft: '-20px'}}> - <IconButton - {...(aitoolkitEnabled ? ({to: 'aitoolkit', component: Link}) : ({href: 'https://nomad-lab.eu/AIToolkit', component: 'a'}))} - > - <img alt='AI toolkit logo' src={FigureAI} style={{width: '120px'}}/> - </IconButton> - </Grid> - <Grid item xs={8}> - <Typography className={styles.title}> - AI lectures - </Typography> - </Grid> - </Grid> - <Typography className={styles.deck}> - We present a virtual course in artificial intelligence, by proposing a path through some of the tutorial notebooks from the AI-toolkit. Each topic is presented via a video lecture and accompanied by one or more notebooks that allow for putting your hand on the explained methods. </Typography> - </Grid> - <Grid item xs={4} className={styles.sectionIcon}> - <img alt='Tutorials icon' src={TutorialsIcon} className={styles.icon}/> - </Grid> - </Grid> - - <Grid container spacing={1} className={styles.tutorialsList}> - <Grid item xs={12}> - <Divider - style={{ - backgroundColor: '#7FEFEF', - height: '13px', - borderRadius: '4px', - marginBottom: '-8px' - }} - /> - </Grid> - <Grid item xs={12}> - <AccordionsList/> - </Grid> - - </Grid> - <Grid item xs={6} className={styles.sectionTitle}> - <Typography className={styles.titleSecondary}> - Next intermediate level - </Typography> - <Typography className={styles.deck}> - If you are still curious about applications of artificial intelligence to materials science, you can find - more lectures and more notebooks in our tutorials section. - </Typography> - <Grid container spacing={1}> - <Grid item xs={4}> - <IconButton - component={Link} - {...(aitoolkitEnabled ? ({to: 'aitoolkit', component: Link}) : ({href: 'https://nomad-lab.eu/AIToolkit', component: 'a'}))} - style={{marginRight: '0px', marginTop: '20px'}} - > - <img alt='AI toolkit logo' src={FigureAI} style={{width: '120px'}}/> - </IconButton> - </Grid> - <Grid item xs={8}> - <Button - width='10px' - color='#2A3C67' - component={Link} - to="tutorials" - className={styles.bottomButton} - endIcon={<img alt='Arrow icon' src={ArrowIcon}/>} - > - <Typography className={styles.bottomButtonText}> - More AI tutorials - </Typography> - </Button> - </Grid> - </Grid> - </Grid> - <Grid item xs={4} className={styles.sectionIcon}> - <IconButton - component={Link} - to="tutorials" - className={styles.bottomIcon} - > - <img alt='Tutorials icon' src={TutorialsIcon} style={{width: '300px'}}/> - </IconButton> - </Grid> - </Grid> -} diff --git a/gui/src/components/aitoolkit/ReproducePage.js b/gui/src/components/aitoolkit/ReproducePage.js deleted file mode 100644 index 20b07654e6f57315fc329a5872ff917c46634657..0000000000000000000000000000000000000000 --- a/gui/src/components/aitoolkit/ReproducePage.js +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Copyright The NOMAD Authors. - * - * This file is part of NOMAD. See https://nomad-lab.eu for further info. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and - * limitations under the License. - */ - -import React, { useMemo, useState } from 'react' -import { useStyles } from './TutorialsPage' -import { - Button, - Grid, - TextField, - Typography, - Divider, - IconButton -} from '@material-ui/core' -import { Link } from 'react-router-dom' -import { StringParam, useQueryParams } from 'use-query-params' -import Autocomplete from '@material-ui/lab/Autocomplete' -import TutorialsIcon from '../../images/AIT_ico_bb_tutorial.svg' -import ArrowIcon from '../../images/AIT_ico_bd_link_go_to.svg' -import ReproduceIcon from '../../images/AIT_ico_bp_replicate.svg' -import AccordionsList from './AccordionsList' -import FigureAI from '../../images/AIT_illu_AIT.svg' -import { aitoolkitEnabled, toolkitMetadata as tutorials } from '../../config' - -export default function ReproducePage() { - const styles = useStyles() - const [queryParameters, setQueryParameters] = useQueryParams({ - author: StringParam, system: StringParam, method: StringParam, filterString: StringParam - }) - - const filter = tutorial => { - const {author, system, method} = queryParameters - if (author && tutorial.authors.indexOf(author) === -1) { - return false - } - if (system && tutorial.labels.application_system.indexOf(system) === -1) { - return false - } - if (method && tutorial.labels.ai_methods.indexOf(method) === -1) { - return false - } - return true - } - - const tutorials_list_advanced = tutorials.tutorials.filter(tutorial => tutorial.labels.category[0] === 'advanced_tutorial') - - const {authors, systems, methods} = useMemo(() => { - const authors = {} - const systems = {} - const methods = {} - tutorials_list_advanced.forEach(tutorial => { - tutorial.key = tutorial.title.replace(/\W/gm, '_').toLowerCase() - tutorial.authors.forEach(i => { authors[i] = i }) - tutorial.labels.application_system.forEach(i => { systems[i] = i }) - tutorial.labels.ai_methods.forEach(i => { methods[i] = i }) - } - ) - return { - authors: Object.keys(authors).sort(), - systems: Object.keys(systems).sort(), - methods: Object.keys(methods).sort() - } - }, [tutorials_list_advanced]) - - const [valAuthor, setAuthor] = useState({}) - const [valSystem, setSystem] = useState({}) - const [valMethod, setMethod] = useState({}) - - return <Grid container spacing={1} className={styles.root}> - <Grid container spacing={0} className={styles.Heading}> - <Grid item xs={6} className={styles.sectionTitle} > - <Grid container spacing={0}> - <Grid item xs={4} style={{marginTop: '-100px', marginLeft: '-20px'}}> - <IconButton - component={Link} - {...(aitoolkitEnabled ? ({to: 'aitoolkit', component: Link}) : ({href: 'https://nomad-lab.eu/AIToolkit', component: 'a'}))} - > - <img alt='AI toolkit logo' src={FigureAI} style={{width: '120px'}}/> - </IconButton> - </Grid> - <Grid item xs={8}> - <Typography className={styles.title}> - Reproduce published results - </Typography> - </Grid> - </Grid> - <Typography className={styles.deck}> - Reproducibility is key in scientific research. The advent of AI-driven big-data analytics has - introduced a new possible source of uncertainty in scientific communication: The AI workflow are - typically complex and there is no standard way to describe them. A solution is offered by the - NOMAD AI toolkit, which hosts open-access notebooks that allow to reproduce result published in - scientific journals. Explore them below - </Typography> - </Grid> - <Grid item xs={4} className={styles.sectionIcon}> - <img alt='Reproduce icon' src={ReproduceIcon} className={styles.icon}/> - </Grid> - </Grid> - <Grid container spacing={0}> - <Grid item xs={12} > - <Typography className={styles.filter} > - Filter Tutorials - </Typography> - </Grid> - <Grid item xs={3}> - <Autocomplete - id="combo-box-demo" - options={authors} - className={styles.autocomplete} - getOptionLabel={option => option} - renderInput={params => ( - <TextField - {...params} - label="Author" - InputProps={{...params.InputProps, disableUnderline: true}} - fullWidth - /> - )} - value={valAuthor} - onChange={(_, value) => { - setQueryParameters({author: value}) - setAuthor(value) - }} - /> - </Grid> - <Grid item xs={3}> - <Autocomplete - id="combo-box-demo" - options={methods} - className={styles.autocomplete} - renderInput={params => ( - <TextField - {...params} - label="AI Method" - InputProps={{...params.InputProps, disableUnderline: true}} - fullWidth - /> - )} - value={valMethod} - onChange={(_, value) => { - setQueryParameters({method: value}) - setMethod(value) - }} - /> - </Grid> - <Grid item xs={3}> - <Autocomplete - id="combo-box-demo" - options={systems} - className={styles.autocomplete} - getOptionLabel={option => option} - renderInput={params => ( - <TextField - {...params} - label="System" - InputProps={{...params.InputProps, disableUnderline: true}} - fullWidth - /> - )} - value={valSystem} - onChange={(_, value) => { - setQueryParameters({system: value}) - setSystem(value) - }} - /> - </Grid> - </Grid> - <Grid container spacing={1} className={styles.tutorialsList}> - - <Grid item xs={12}> - <Divider - style={{ - backgroundColor: '#7FEFEF', - height: '13px', - borderRadius: '4px', - marginBottom: '-8px' - }} - /> - </Grid> - <Grid item xs={12}> - <AccordionsList tutorials_list={tutorials_list_advanced} - setAuthor = {setAuthor} - setSystem={setSystem} - setMethod={setMethod} - filter={filter} - setQueryParameters={setQueryParameters} - queryParameters={queryParameters} - emptyQuery={queryParameters} /> - </Grid> - - </Grid> - <Grid item xs={6} className={styles.sectionTitle} > - <Typography className={styles.titleSecondary}> - Explore the basics of AI - </Typography> - <Typography className={styles.deck}> - Recent applications of artificial intelligence in science build on top - of solid methodologies that have been being developed over the last decades. - Exploring the following tutorials, you can learn the basics of AI to - better understand their latest applications in materials science. - </Typography> - <Grid container spacing={1}> - <Grid item xs={4}> - <IconButton - component={Link} - {...(aitoolkitEnabled ? ({to: 'aitoolkit', component: Link}) : ({href: 'https://nomad-lab.eu/AIToolkit', component: 'a'}))} - style={{marginRight: '0px', marginTop: '20px'}} - > - <img alt='AI toolkit logo' src={FigureAI} style={{width: '120px'}}/> - </IconButton> - </Grid> - <Grid item xs={8}> - <Button - width='10px' - color='#2A3C67' - component={Link} - to="tutorials" - className={styles.bottomButton} - endIcon={<img alt='Arrow icon' src={ArrowIcon}/>} - > - <Typography className={styles.bottomButtonText} > - AI tutorials - </Typography> - </Button> - </Grid> - </Grid> - </Grid> - <Grid item xs={4} className={styles.sectionIcon}> - <IconButton - component={Link} - to="tutorials" - className={styles.bottomIcon} - > - <img alt='Tutorials icon' src={TutorialsIcon} style={{width: '300px'}}/> - </IconButton> - - </Grid> - </Grid> -} diff --git a/gui/src/components/aitoolkit/TutorialsPage.js b/gui/src/components/aitoolkit/TutorialsPage.js deleted file mode 100644 index c874fb609a1b00096a11da648f18e9c8f275e8da..0000000000000000000000000000000000000000 --- a/gui/src/components/aitoolkit/TutorialsPage.js +++ /dev/null @@ -1,415 +0,0 @@ -/* - * Copyright The NOMAD Authors. - * - * This file is part of NOMAD. See https://nomad-lab.eu for further info. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and - * limitations under the License. - */ -import React, { useMemo, useState } from 'react' -import { - Box, - Button, - Grid, - TextField, - Typography, - Divider, - IconButton, - makeStyles -} from '@material-ui/core' -import { Link } from 'react-router-dom' -import Autocomplete from '@material-ui/lab/Autocomplete' -import { StringParam, useQueryParams } from 'use-query-params' -import TutorialsIcon from '../../images/AIT_ico_bp_tutorial.svg' -import ArrowIcon from '../../images/AIT_ico_bd_link_go_to.svg' -import ReproduceIcon from '../../images/AIT_ico_bb_replicate.svg' -import AccordionsList from './AccordionsList' -import FigureAI from '../../images/AIT_illu_AIT.svg' -import { aitoolkitEnabled, toolkitMetadata as tutorials } from '../../config' - -export const useStyles = makeStyles(theme => ({ - root: { - margin: theme.spacing(3), - width: '100%', - marginLeft: 'auto', - marginRight: 'auto', - maxWidth: '1052px', - marginBottom: '150px' - }, - sectionIcon: { - marginTop: theme.spacing(3) - }, - sectionTitle: { - marginBottom: theme.spacing(1), - marginLeft: theme.spacing(2), - marginTop: '105px' - }, - title: { - color: '#2A3C67', - fontSize: '35px', - marginLeft: '-10px', - fontWeight: theme.typography.fontWeightMedium, - marginTop: '-70px' - }, - deck: { - color: '#2A3C67', - fontSize: '22px', - marginTop: '20px', - lineHeight: '30px', - marginLeft: '-10px', - width: '518px' - }, - icon: { - height: '371px', - marginTop: '-20px', - marginLeft: '100px' - }, - filter: { - fontWeight: theme.typography.fontWeightMedium, - color: '#2A3C67', - fontSize: '20px', - marginTop: '60px', - marginLeft: '0px' - }, - autocomplete: { - height: 'auto', - color: '#2A3C67', - border: '3px solid #00DFE0', - borderRadius: '10px 10px 10px 10px', - marginTop: '10px', - marginLeft: '0px', - width: '240px' - }, - tutorialsList: { - marginTop: '50px' - }, - textLevel: { - textAlign: 'left', - color: '#2A3C67', - fontSize: '22px', - height: '22px', - marginTop: '-16px' - }, - titleSecondary: { - fontWeight: 'bold', - color: '#00DFE0', - fontSize: '35px', - marginLeft: '-10px' - }, - bottomButton: { - color: '#F3F2F5', - backgroundColor: '#F3F2F5', - borderRadius: '30px', - width: '242px', - height: '70px', - textAlign: 'center', - align: 'center', - marginTop: '40px', - textTransform: 'none', - fontSize: '12pt', - lineHeight: '20px' - }, - bottomButtonText: { - color: '#2A3C67', - fontWeight: theme.typography.fontWeightMedium - }, - bottomIcon: { - marginTop: '80px', - marginLeft: '120px' - } -})) - -export default function TutorialsPage() { - const styles = useStyles() - const [queryParameters, setQueryParameters] = useQueryParams({ - author: StringParam, system: StringParam, method: StringParam, filterString: StringParam - }) - - const filter = tutorial => { - const {author, system, method} = queryParameters - if (author && tutorial.authors.indexOf(author) === -1) { - return false - } - if (system && tutorial.labels.application_system.indexOf(system) === -1) { - return false - } - if (method && tutorial.labels.ai_methods.indexOf(method) === -1) { - return false - } - return true - } - - const tutorials_list = tutorials.tutorials.filter(tutorial => tutorial.labels.category[0] === 'beginner_tutorial' || - tutorial.labels.category[0] === 'intermediate_tutorial' || tutorial.labels.category[0] === 'query_tutorial') - - const tutorials_list_beginner = tutorials_list.filter(tutorial => tutorial.labels.category[0] === 'beginner_tutorial') - - const tutorials_list_intermediate = tutorials_list.filter(tutorial => tutorial.labels.category[0] === 'intermediate_tutorial') - - const tutorials_list_query = tutorials_list.filter(tutorial => tutorial.labels.category[0] === 'query_tutorial') - - const {authors, systems, methods} = useMemo(() => { - const authors = {} - const systems = {} - const methods = {} - tutorials_list.forEach(tutorial => { - tutorial.key = tutorial.title.replace(/\W/gm, '_').toLowerCase() - tutorial.authors.forEach(i => { authors[i] = i }) - tutorial.labels.application_system.forEach(i => { systems[i] = i }) - tutorial.labels.ai_methods.forEach(i => { methods[i] = i }) - } - ) - return { - authors: Object.keys(authors).sort(), - systems: Object.keys(systems).sort(), - methods: Object.keys(methods).sort() - } - }, [tutorials_list]) - - const [valAuthor, setAuthor] = useState({}) - const [valSystem, setSystem] = useState({}) - const [valMethod, setMethod] = useState({}) - - return <Grid container spacing={1} className={styles.root}> - <Grid container spacing={0} className={styles.Heading}> - <Grid item xs={6} className={styles.sectionTitle}> - <Grid container spacing={0}> - <Grid item xs={4} style={{marginTop: '-100px', marginLeft: '-20px'}}> - <IconButton - {...(aitoolkitEnabled ? ({to: 'aitoolkit', component: Link}) : ({href: 'https://nomad-lab.eu/AIToolkit', component: 'a'}))} - > - <img alt='AI toolkit logo' src={FigureAI} style={{width: '120px'}}/> - </IconButton> - </Grid> - <Grid item xs={8}> - <Typography className={styles.title}> - Learn from tutorials - </Typography> - </Grid> - </Grid> - <Typography className={styles.deck}> - We develop and implement methods that identify correlations and - structure in big data of materials. This will enable scientists and - engineers to decide which materials are useful for specific - applications or which new materials should be the focus of future - studies. The following BEGINNER and INTERMEDIATE LEVEL tutorials are designed to get started with the - AI Toolkit. - </Typography> - </Grid> - <Grid item xs={4} className={styles.sectionIcon}> - <img alt='Tutorials icon' src={TutorialsIcon} className={styles.icon}/> - </Grid> - </Grid> - <Grid container spacing={0}> - <Grid item xs={12} > - <Typography className={styles.filter}> - Filter Tutorials - </Typography> - </Grid> - <Grid item xs={3}> - <Autocomplete - id="combo-box-demo" - options={authors} - className={styles.autocomplete} - getOptionLabel={option => option} - renderInput={params => ( - <TextField - {...params} - label="Author" - InputProps={{...params.InputProps, disableUnderline: true}} - fullWidth - /> - )} - value={valAuthor} - onChange={(_, value) => { - setQueryParameters({author: value}) - setAuthor(value) - }} - /> - </Grid> - <Grid item xs={3}> - <Autocomplete - id="combo-box-demo" - options={methods} - className={styles.autocomplete} - renderInput={params => ( - <TextField - {...params} - label="AI Method" - InputProps={{...params.InputProps, disableUnderline: true}} - fullWidth - /> - )} - value={valMethod} - onChange={(_, value) => { - setQueryParameters({method: value}) - setMethod(value) - }} - /> - </Grid> - <Grid item xs={3}> - <Autocomplete - id="combo-box-demo" - options={systems} - className={styles.autocomplete} - getOptionLabel={option => option} - renderInput={params => ( - <TextField - {...params} - label="System" - InputProps={{...params.InputProps, disableUnderline: true}} - fullWidth - /> - )} - value={valSystem} - onChange={(_, value) => { - setQueryParameters({system: value}) - setSystem(value) - }} - /> - </Grid> - </Grid> - <Grid container spacing={1} className={styles.tutorialsList}> - <Grid item xs={12}> - {tutorials_list_beginner.some(tutorial => filter(tutorial)) && - <Grid container spacing={1}> - <Grid item xs={3}> - <Typography className={styles.textLevel}> - BEGINNER LEVEL - </Typography> - </Grid> - <Grid item xs={9}> - <Divider disableGutters - style={{ - backgroundColor: '#7FEFEF', - height: '13px', - borderRadius: '4px' - }}/> - </Grid> - </Grid> - } - <AccordionsList tutorials_list={tutorials_list_beginner} - setAuthor = {setAuthor} - setSystem={setSystem} - setMethod={setMethod} - filter={filter} - setQueryParameters={setQueryParameters} - queryParameters={queryParameters} - emptyQuery={queryParameters} /> - </Grid> - <Box mt={'100px'}> - {tutorials_list_intermediate.some(tutorial => filter(tutorial)) && - <Grid container spacing={1}> - <Grid item xs={3}> - <Typography className={styles.textLevel}> - INTERMEDIATE LEVEL - </Typography> - </Grid> - <Grid item xs={9}> - <Divider disableGutters - style={{ - backgroundColor: 'rgba(127, 239, 239, 1)', - height: '13px', - borderRadius: '4px' - }}/> - </Grid> - </Grid> - } - <Grid item xs={12}> - <AccordionsList tutorials_list={tutorials_list_intermediate} - setAuthor = {setAuthor} - setSystem={setSystem} - setMethod={setMethod} - filter={filter} - setQueryParameters={setQueryParameters} - queryParameters={queryParameters} - emptyQuery={queryParameters} /> - </Grid> - </Box> - <Box mt={'100px'}> - {tutorials_list_query.some(tutorial => filter(tutorial)) && - <Grid container spacing={1}> - <Grid item xs={3}> - <Typography className={styles.textLevel}> - TOOLKIT INFRASTRUCTURE - </Typography> - </Grid> - <Grid item xs={9}> - <Divider disableGutters - style={{ - backgroundColor: 'rgba(127, 239, 239, 1)', - height: '13px', - borderRadius: '4px' - }}/> - </Grid> - </Grid> - } - <Grid item xs={12}> - <AccordionsList tutorials_list={tutorials_list_query} - setAuthor = {setAuthor} - setSystem={setSystem} - setMethod={setMethod} - filter={filter} - setQueryParameters={setQueryParameters} - queryParameters={queryParameters} - emptyQuery={queryParameters} /> - </Grid> - </Box> - - </Grid> - <Grid item xs={6} className={styles.sectionTitle}> - <Typography className={styles.titleSecondary}> - Next advanced level - </Typography> - <Typography className={styles.deck}> - After learning the basics of artificial-intelligence tools, you can apply the latest - AI developments to timely problems in materials science. These - outstanding applications allow to reproduce results that have been - published recently in scientific journals. - </Typography> - <Grid container spacing={1}> - <Grid item xs={4}> - <IconButton - component={Link} - {...(aitoolkitEnabled ? ({to: 'aitoolkit', component: Link}) : ({href: 'https://nomad-lab.eu/AIToolkit', component: 'a'}))} - style={{marginRight: '0px', marginTop: '20px'}} - > - <img alt='AI toolkit logo' src={FigureAI} style={{width: '120px'}}/> - </IconButton> - </Grid> - <Grid item xs={8}> - <Button - width='10px' - color='#2A3C67' - component={Link} - to="reproduce" - className={styles.bottomButton} - endIcon={<img alt='Arrow icon' src={ArrowIcon}/>} - > - <Typography className={styles.bottomButtonText}> - Advanced applications - </Typography> - </Button> - </Grid> - </Grid> - </Grid> - <Grid item xs={4} className={styles.sectionIcon}> - <IconButton - component={Link} - to="reproduce" - className={styles.bottomIcon} - > - <img alt='Reproduce icon' src={ReproduceIcon} style={{width: '300px'}}/> - </IconButton> - </Grid> - </Grid> -} diff --git a/gui/src/components/nav/Routes.js b/gui/src/components/nav/Routes.js index 07c809a7672eb9defc3be9cba18246e5b011bdd5..aef86e2a287ddacd9d04c13a78cc53eb4b8c1185 100644 --- a/gui/src/components/nav/Routes.js +++ b/gui/src/components/nav/Routes.js @@ -23,9 +23,6 @@ import { CacheRoute, CacheSwitch } from 'react-router-cache-route' import { matchPath, useLocation, Redirect, useHistory, Link as RouterLink } from 'react-router-dom' import { Button, Link, makeStyles, Tooltip } from '@material-ui/core' import About from '../About' -import TutorialsPage from '../aitoolkit/TutorialsPage' -import ReproducePage from '../aitoolkit/ReproducePage' -import CoursePage from '../aitoolkit/CoursePage' import { MetainfoPage, help as metainfoHelp } from '../archive/MetainfoBrowser' import EntryPage, { help as entryHelp } from '../entry/EntryPage' import UploadsPage, { help as uploadsHelp } from '../uploads/UploadsPage' @@ -285,16 +282,6 @@ export const routes = [ }, component: MetainfoPage }, - { - path: 'tutorials', - title: 'Artificial Intelligence Toolkit', - component: TutorialsPage - }, - { - path: 'reproduce', - title: 'Artificial Intelligence Toolkit', - component: ReproducePage - }, ...(ui?.north?.enabled ? [ { path: 'north', @@ -307,12 +294,7 @@ export const routes = [ }, component: NorthPage } - ] : []), - { - path: 'course', - title: 'Artificial Intelligence Toolkit', - component: CoursePage - } + ] : []) ] }, { diff --git a/gui/src/config.js b/gui/src/config.js index 7fbd746257afdcb7846f3b9208a333f978b8e208..5341ef93a320207558000f73dad59b7e1c6ca044 100644 --- a/gui/src/config.js +++ b/gui/src/config.js @@ -108,7 +108,6 @@ export const keycloakRealm = window.nomadEnv.keycloakRealm export const keycloakClientId = window.nomadEnv.keycloakClientId export const debug = window.nomadEnv.debug || false export const encyclopediaBase = window.nomadEnv.encyclopediaBase -export const aitoolkitEnabled = window.nomadEnv.aitoolkitEnabled || false export const oasis = window.nomadEnv.oasis || false export const globalLoginRequired = window.nomadEnv.globalLoginRequired || false export const appTokenMaxExpiresIn = window.nomadEnv.appTokenMaxExpiresIn || "2023-10-25" diff --git a/gui/src/courseAI.json b/gui/src/courseAI.json deleted file mode 100644 index b5f88b7e3736bcedbd43a465d04fd083bbf0bfec..0000000000000000000000000000000000000000 --- a/gui/src/courseAI.json +++ /dev/null @@ -1,136 +0,0 @@ - { - "tutorials": [ - { - "lecturer": "Luca Ghiringhelli", - "title": "Introduction to artificial intelligence and machine-learning methods", - "description": "This introductory lecture covers a general overview of artificial intelligence methods, including machine-learning and data-mining methods. There is no hands-on notebook specifically associated to this lectures, but the concepts introduced therein can be useful to link together the various techniques presented in the next lectures.", - "link_video_1": "https://www.youtube.com/watch?v=z_Q0yXGHPDE", - "link_video_2": "https://www.youtube.com/watch?v=7m0vfdK716I", - "notebook_1": "true", - "authors_notebook_1": [ - "Ahmetcik, Emre", - "Ziletti, Angelo", - "Ouyang, Runhai", - "Sbail\u00f2, Luigi", - "Scheffler, Matthias", - "Ghiringhelli, Luca M."] - }, - { - "lecturer": "Santiago Rigamonti", - "title": "Regularized regression and kernel methods", - "description": "In this tutorial, we will explore the application of kernel ridge regression to the prediction of materials properties.", - "link_video_1": "https://www.youtube.com/watch?v=QHfcpuYfDtI", - "link_video_2": "https://www.youtube.com/watch?v=A6c_QJmMAqE", - "notebook_name_1": "krr4mat.ipynb", - "link_notebook_1": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/krr4mat.ipynb", - "authors_notebook_1": [ - "Langer, Marcel" - ] - }, - { - "lecturer": "Daniel Speckhard", - "title": "Decision trees and random forests", - "description": "In this tutorial, we will introduce decision trees. We go through a toy model introducing the SKLearn API. We then discuss step by step the different theoretical aspects of trees. We then move to training a regression tree and classification tree on different datasets related to materials science. We end the tutorial by covering random forests and bagging classfiers.", - "link_video_1": "https://www.youtube.com/watch?v=lUdCB6cqpvo", - "link_video_2": "https://www.youtube.com/watch?v=rwxE35URuF8", - "authors_notebook_1": [ - "Speckhard, Daniel", - "Leitherer, Andreas", - "Ghiringhelli, Luca M." - ], - "notebook_name_1": "decision_tree.ipynb", - "link_notebook_1": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/decision_tree.ipynb" - }, - { - "lecturer": "Angelo Ziletti", - "title": "Artificial neural networks and deep learning", - "link_video_1": "https://www.youtube.com/watch?v=-_-2ESB4Ag0", - "link_video_2": "https://www.youtube.com/watch?v=qRqIU3kYF80", - "description": "In these tutorials, we introduce the basic of deep learning, via tranditional multilayer perceptrons and modern convolutional neural networks.", - "notebook_name_1": "nn_regression.ipynb", - "link_notebook_1": "https://nomad-lab.eu/prod/analytics/public/user-redirect/notebooks/tutorials/nn_regression.ipynb", - "authors_notebook_1": [ - "Leitherer, Andreas", - "Sbail\u00f2, Luigi", - "Ghiringhelli, Luca M." - ], - "notebook_name_2": "convolutional_nn.ipynb", - "link_notebook_2": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/convolutional_nn.ipynb", - "authors_notebook_2": [ - "Ziletti, Angelo", - "Leitherer, Andreas", - "Ghiringhelli, Luca M." - ] - }, - { - "lecturer": "Luigi Sbail\u00f2", - "title": "Unsupervised learning", - "link_video_1": "https://www.youtube.com/watch?v=Ozu-QCBB2bg", - "link_video_2": "https://www.youtube.com/watch?v=hnB5B7Iu6Ds", - "description": "In this tutorial, we introduce to the most popular clustering algorithms. We focus on partitioning, hierarchical and density-based clustering algorithms. The methods are tested on synthetic datasets of increasing complexity.", - "notebook_name_1": "clustering_tutorial.ipynb", - "link_notebook_1": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/clustering_tutorial.ipynb", - "authors_notebook_1": [ - "Sbail\u00f2, Luigi", - "Ghiringhelli, Luca M." - ], - "notebook_name_2": "exploratory_analysis.ipynb", - "link_notebook_2": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/exploratory_analysis.ipynb", - "authors_notebook_2": [ - "Sbail\u00f2, Luigi", - "Ghiringhelli, Luca M." - ] - }, - { - "lecturer": "Luca Ghiringhelli", - "title": "Compressed sensing meets symbolic regression: SISSO", - "description": "In this tutorial, we will show how to find descriptive parameters to predict materials properties using symbolic regrression combined with compressed sensing tools. The relative stability of the zincblende (ZB) versus rocksalt (RS) structure of binary materials is predicted and compared against a model trained with kernel ridge regression.", - "link_video_1": "https://www.youtube.com/watch?v=YJZm4xot4bM", - "link_video_2": "https://www.youtube.com/watch?v=KjPCMdWikBg", - "notebook_name_1": "compressed_sensing.ipynb", - "authors_notebook_1": [ - "Ahmetcik, Emre", - "Ziletti, Angelo", - "Ouyang, Runhai", - "Sbail\u00f2, Luigi", - "Scheffler, Matthias", - "Ghiringhelli, Luca M." - ], - "link_notebook_1": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/compressed_sensing.ipynb" - }, - { - "lecturer": "Matthias Scheffler", - "title": "Subgroup discovery, rare-phenomena challenge, and domain of applicability", - "link_video_1": "https://www.youtube.com/watch?v=cizNEJypwao", - "link_video_2": "https://www.youtube.com/watch?v=uKEzs6koTcs", - "description": "In these tutorials, we introduce the subgroup discovery (SGD) method, which identifies rules (Boolean statements involving selected features among the given candidates) describing exceptional subsets of data. SGD is an exploratory analysis tools and allows for identifying local structure in the data, while most ML tools focus on global models. A notable application of SGD is to locate the domain of applicability of ML models, i.e., identifying the property of data that are expected to yield significantly lower errors than the overall dataset. A notebook on this specific application is also linked.", - "authors_notebook_1":[ - "Foppa, Lucas", - "Ghiringhelli, Luca M." - ], - - "notebook_name_1": "sgd_alloys_oxygen_reduction_evolution.ipynb", - "link_notebook_1": "https://nomad-lab.eu/prod/analytics/public/user-redirect/notebooks/tutorials/sgd_alloys_oxygen_reduction_evolution.ipynb", - "notebook_name_2": "domain_of_applicability.ipynb", - "link_notebook_2": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/domain_of_applicability.ipynb", - "authors_notebook_2": [ - "Arif, Mohammad-Yasin", - "Sbail\u00f2, Luigi", - "Ghiringhelli, Luca M." - ] - }, - { - "lecturer": "Lucas Foppa", - "title": "Fusion of experimental and computational data by AI", - "description": "In this tutorial, we provide an example of AI techniques combined to experiments, in such a way that the AI is trained on an initial set of data and the predictions of the trained model is used to guide the experiment in a similar but distinct class of materials.", - "link_video_1": "https://www.youtube.com/watch?v=8wbITgsDNqE", - "authors_notebook_1": [ - "Foppa, Lucas", - "Ghiringhelli, Luca M.", - "Scheffler, Matthias" - ], - "notebook_name_1": "sgd_propylene_oxidation_hte.ipynb", - "link_notebook_1": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/sgd_propylene_oxidation_hte.ipynb" - } - ] - } diff --git a/gui/tests/artifacts.js b/gui/tests/artifacts.js index b0f6b3558f067c3dc4c8326c16a43d7aa1e72813..4bac4d8e4f0bb2995510b37427f17230f075901d 100644 --- a/gui/tests/artifacts.js +++ b/gui/tests/artifacts.js @@ -65412,1140 +65412,6 @@ window.nomadArtifacts = { "tableOfFiles": "|Input Filename| Description|\n|--- | --- |\n|`vasprun.xml` | **Mainfile** in plain-text (structured) XML format |\n|`OUTCAR` | plain-text (semi-structured) file, VAPS's detailed output. Read by NOMAD only as fallback to parse `outcar` data |\n" } }, - "toolkitMetadata": { - "tutorials": [ - { - "authors": [ - "Ahmetcik, Emre", - "Ziletti, Angelo", - "Ouyang, Runhai", - "Sbail\u00f2, Luigi", - "Scheffler, Matthias", - "Ghiringhelli, Luca M." - ], - "email": "ghiringhelli@fhi-berlin.mpg.de", - "title": "Symbolic regression via compressed sensing: a tutorial", - "description": "In this tutorial we will show how to find descriptive parameters to predict materials properties using symbolic regrression combined with compressed sensing tools. The relative stability of the zincblende (ZB) versus rocksalt (RS) structure of binary materials is predicted and compared against a model trained with kernel ridge regression.", - "notebook_name": "compressed_sensing.ipynb", - "url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-compressed-sensing", - "link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/compressed_sensing.ipynb", - "link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/compressed_sensing.ipynb", - "link_video": "https://www.youtube.com/watch?v=73mLp6C2opY", - "link_paper": "https://th.fhi-berlin.mpg.de/site/uploads/Publications/NJP-19-023017-2017.pdf", - "link_doi_paper": "https://doi.org/10.1088/1367-2630/aa57bf", - "updated": "2020-09-20", - "flags": { - "featured": true, - "top_of_list": false - }, - "labels": { - "application_keyword": [], - "application_section": [ - "Tutorials for artificial-intelligence methods" - ], - "application_system": [ - "Octet binaries" - ], - "category": [ - "beginner_tutorial" - ], - "ai_methods": [ - "Supervised learning", - "Regression", - "Compressed sensing", - "Symbolic regression", - "LASSO", - "SISSO", - "Kernel ridge regression", - "Features selection", - "Atomic features" - ], - "platform": [ - "jupyter" - ] - } - }, - { - "authors": [ - "Liu, Xiangyue", - "Sutton, Christopher", - "Yamamoto, Takenori", - "Blumenthal, Lars", - "Golebiowski, Jacek", - "Ziletti, Angelo", - "Scheffler, Matthias", - "Ghiringhelli, Luca M." - ], - "email": "ghiringhelli@fhi-berlin.mpg.de", - "title": "2018 NOMAD-Kaggle research competition", - "description": "In this tutorial, we will explore the best results of the NOMAD 2018 Kaggle research competition. The goal of this competition was to develop machine-learning models for the prediction of two target properties: the formation energy and the bandgap energy of transparent semiconducting oxides. The purpose of the modelling is to facilitate the discovery of new such materials and allow for advancements in (opto)electronic technologies", - "notebook_name": "kaggle_competition.ipynb", - "url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-kaggle-competition", - "link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/kaggle_competition.ipynb", - "link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/kaggle_competition.ipynb", - "link_paper": "https://th.fhi.mpg.de/site/uploads/Publications/s41524-019-0239-3.pdf", - "link_doi_paper": "https://www.nature.com/articles/s41524-019-0239-3", - "updated": "2021-01-19", - "flags": { - "featured": true, - "top_of_list": false - }, - "labels": { - "application_section": [ - "Timely artificial-intelligence applications to Materials Science" - ], - "application_system": [ - "Transparent conducting oxides" - ], - "category": [ - "advanced_tutorial" - ], - "ai_methods": [ - "Supervised learning", - "Regression", - "Kernel ridge regression", - "Neural networks", - "SOAP", - "n-gram" - ], - "platform": [ - "jupyter" - ] - } - }, - { - "authors": [ - "Ziletti, Angelo", - "Leitherer, Andreas", - "Ghiringhelli, Luca M." - ], - "email": "ghiringhelli@fhi-berlin.mpg.de", - "title": "Introduction to convolutional neural networks", - "description": "In this tutorial, we briefly introduce the main ideas behind convolutional neural networks, build a neural network model with Keras, and explain the classification decision process using attentive response maps.", - "notebook_name": "convolutional_nn.ipynb", - "url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-convolutional-nn", - "link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/convolutional_nn.ipynb", - "link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/convolutional_nn.ipynb", - "link_video": "https://youtu.be/MST8X1yCWK8", - "updated": "2021-01-29", - "flags": { - "featured": true, - "top_of_list": false - }, - "labels": { - "application_section": [ - "Tutorials for artificial-intelligence methods" - ], - "application_system": [ - "Images" - ], - "category": [ - "intermediate_tutorial" - ], - "ai_methods": [ - "Supervised learning", - "Classification", - "Neural networks", - "Convolutional neural networks", - "Attentive response map" - ], - "platform": [ - "jupyter" - ] - } - }, - { - "authors": [ - "Fekete, \u00c1d\u00e1m", - "Stella, Martina", - "Lambert, Henry", - "De Vita, Alessandro", - "Cs\u00e1nyi, G\u00e1bor" - ], - "email": "adam.fekete@kcl.ac.uk", - "title": "The SOAP descriptor, Gaussian Approximation Potentials (GAP) and machine learning of force fields", - "description": "In this tutorial, we will be using a Gaussian Approximation Potentials to analyse results of TB DFT calculations on the Si surface. Along the way we will learn about different descriptors (2b, 3b, SOAP) to describe local atomic environment in order to predict energies and forces of the Si surface.", - "notebook_name": "gap_si_surface.ipynb", - "url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-gap-si-surface", - "link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/gap_si_surface.ipynb", - "link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/gap_si_surface.ipynb", - "updated": "2020-06-18", - "flags": { - "featured": true, - "top_of_list": false - }, - "labels": { - "application_section": [ - "Tutorials for artificial-intelligence methods" - ], - "application_system": [ - "Silicon", - "Surface" - ], - "category": [ - "intermediate_tutorial" - ], - "ai_methods": [ - "Supervised learning", - "Regression", - "Gaussian-process regression", - "Kernel ridge regression", - "SOAP", - "Gaussian approximation potentials (GAP)" - ], - "platform": [ - "jupyter" - ] - } - }, - { - "authors": [ - "Cs\u00e1nyi, G\u00e1bor", - "Kermode, James R." - ], - "email": "gc121@cam.ac.uk", - "title": "Machine learning atomic charges", - "description": "In this tutorial, we will use Gaussian process regression, GPR (or equivalently, Kernel Ridge Regression, KRR) to train and predict charges on atoms in small organic molecules.", - "notebook_name": "soap_atomic_charges.ipynb", - "url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-soap-atomic-charges", - "link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/soap_atomic_charges.ipynb", - "link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/soap_atomic_charges.ipynb", - "updated": "2019-09-26", - "flags": { - "featured": true, - "top_of_list": false - }, - "labels": { - "application_section": [ - "Tutorials for artificial-intelligence methods" - ], - "application_system": [ - "GDB molecular database", - "GDB7" - ], - "category": [ - "intermediate_tutorial" - ], - "ai_methods": [ - "Supervised learning", - "Regression", - "Gaussian-process regression", - "Kernel ridge regression", - "SOAP" - ], - "platform": [ - "jupyter" - ] - } - }, - { - "authors": [ - "Fekete, \u00c1d\u00e1m", - "Stella, Martina", - "Lambert, Henry", - "De Vita, Alessandro", - "Cs\u00e1nyi, G\u00e1bor" - ], - "email": "adam.fekete@kcl.ac.uk", - "title": "Structure similarity and structure-property relationship: grain boundaries of alpha-Fe", - "description": "In this tutorial, we will be using a machine-learning method (clustering) to analyse results of grain-boundary (GB) calculations of alpha-iron. Along the way, we will learn about different methods to describe local atomic environment in order to calculate properties of GBs. We will use these properties to separate the different regions of the GB using clustering methods. Finally we will determine how the energy of the GB is changing according to the angle difference of the regions.", - "notebook_name": "grain_boundaries.ipynb", - "url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-grain-boundaries", - "link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/grain_boundaries.ipynb", - "link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/grain_boundaries.ipynb", - "link_paper": "https://www.sciencedirect.com/science/article/pii/S0010465518301450?via%3Dihub", - "link_doi_paper": "https://www.sciencedirect.com/science/article/pii/S0010465518301450/pdfft?md5=f21651f69edad3505ed3dd3ba38aee18&pid=1-s2.0-S0010465518301450-main.pdf", - "updated": "2020-01-18", - "flags": { - "featured": true, - "top_of_list": false - }, - "labels": { - "application_section": [ - "Timely artificial-intelligence applications to Materials Science" - ], - "application_system": [ - "Iron", - "Grain boundaries" - ], - "category": [ - "advanced_tutorial" - ], - "ai_methods": [ - "Unsupervised learning", - "Supervised learning", - "Clustering", - "Regression", - "k-means", - "Gaussian mixture" - ], - "platform": [ - "jupyter" - ] - } - }, - { - "authors": [ - "Regler, Benjamin", - "Scheffler, Matthias", - "Ghiringhelli, Luca M." - ], - "email": "regler@fhi-berlin.mpg.de", - "title": "Introduction to total cumulative mutual information", - "description": "This interactive notebook introduces the concepts and original implementation of total cumulative mutual information (TCMI), as presented in the related publication. The main results of the publication are also reproduced in a hands-on style", - "notebook_name": "tcmi.ipynb", - "url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-tcmi", - "link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/tcmi.ipynb", - "link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/tcmi.ipynb", - "link_paper": "https://arxiv.org/pdf/2001.11212", - "link_doi_paper": "https://arxiv.org/abs/2001.11212", - "updated": "2020-02-06", - "flags": { - "featured": true, - "top_of_list": false - }, - "labels": { - "application_section": [ - "Tutorials for artificial-intelligence methods" - ], - "application_system": [ - "Synthetic data", - "UCI regression dataset", - "Octet binaries" - ], - "category": [ - "advanced_tutorial" - ], - "ai_methods": [ - "Supervised learning", - "Unsupervised learning", - "Features selection", - "Information theory", - "Mutual information", - "Cumulative entropy", - "Clustering", - "TCMI" - ], - "language": [ - "python", - "javascript" - ], - "platform": [ - "jupyter" - ] - } - }, - { - "authors": [ - "Arif, Mohammad-Yasin", - "Sbail\u00f2, Luigi", - "Purcell, Thomas A. R.", - "Ghiringhelli, Luca M.", - "Scheffler, Matthias" - ], - "email": "ghiringhelli@fhi-berlin.mpg.de", - "title": "Predicting energy differences between crystal structures: (Meta-)stability of octet-binary compounds", - "description": "A tool for predicting the difference in the total energy between different polymorphs for 82 octet binary compounds, which gives an indication of the stability of the material. This is accomplished by identifying a set of descriptive parameters (a descriptor) from the free-atom data for the binary atomic species comprising the material using the Sure Independent Screening (SIS) + l0-norm minimization approach.", - "notebook_name": "descriptor_role.ipynb", - "url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-descriptor-role", - "link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/descriptor_role.ipynb", - "link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/descriptor_role.ipynb", - "link_paper": "https://th.fhi.mpg.de/site/uploads/Publications/PRL-114-105503-2015.pdf", - "link_doi_paper": "http://dx.doi.org/10.1103/PhysRevLett.114.105503", - "updated": "2021-10-18", - "flags": { - "featured": true, - "top_of_list": false - }, - "labels": { - "application_section": [ - "Timely artificial-intelligence applications to Materials Science" - ], - "application_system": [ - "Octet binaries", - "Rock salt", - "Zinc blende" - ], - "category": [ - "advanced_tutorial" - ], - "ai_methods": [ - "Supervised learning", - "Regression", - "Features selection", - "SISSO", - "Atomic features" - ], - "platform": [ - "jupyter" - ] - } - }, - { - "authors": [ - "Bieniek, Bj\u00f6rn", - "Strange, Mikkel", - "Carbogno, Christian", - "Arif, Mohammad-Yasin", - "Sbail\u00f2, Luigi", - "Scheffler, Matthias" - ], - "email": "ghiringhelli@fhi-berlin.mpg.de", - "title": "Error estimates from high-accuracy electronic-structure reference calculations", - "description": "A set of tools to analyze the error in electronic structure calculations due to the choice of numerical settings. We use the NOMAD infrastructure to systematically investigate the deviances in total and relative energies as function of typical settings for basis sets, k-grids, etc. for 71 elemental and 81 binary solids in three different electronic-structure codes.", - "notebook_name": "error_estimates.ipynb", - "url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-error-estimates", - "link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/error_estimates.ipynb", - "link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/error_estimates.ipynb", - "link_paper": "https://th.fhi-berlin.mpg.de/site/uploads/Publications/2008.10402.pdf", - "link_doi_paper": "https://arxiv.org/abs/2008.10402", - "updated": "2021-01-21", - "flags": { - "featured": true, - "top_of_list": false - }, - "labels": { - "application_section": [ - "Timely artificial-intelligence applications to Materials Science" - ], - "category": [ - "advanced_tutorial" - ], - "application_system": [ - "Binaries", - "Elemental solids" - ], - "ai_methods": [ - "Supervised learning", - "Regression", - "Linear least-squares regression" - ], - "platform": [ - "jupyter" - ] - } - }, - { - "authors": [ - "Sbail\u00f2, Luigi", - "Scheffler, Matthias", - "Ghiringhelli, Luca M." - ], - "email": "ghiringhelli@fhi-berlin.mpg.de", - "title": "Querying the NOMAD Archive and performing artificial-intelligence modeling", - "description": "In this tutorial, we demonstrate how to query the NOMAD Archive from the NOMAD Analytics toolkit. We then show examples of machine learning analysis performed on the retrieved data set.", - "notebook_name": "query_nomad_archive.ipynb", - "url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-query-nomad-archive", - "link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/query_nomad_archive.ipynb", - "link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/query_nomad_archive.ipynb", - "updated": "2022-04-06", - "flags": { - "featured": true, - "top_of_list": false - }, - "labels": { - "application_section": [ - "Analysing the content of the Archive" - ], - "application_system": [ - "Ternaries" - ], - "category": [ - "query_tutorial" - ], - "ai_methods": [ - "Unsupervised learning", - "Supervised learning", - "Regression", - "Clustering", - "Dimension reduction", - "Random forest" - ], - "platform": [ - "jupyter" - ] - } - }, - { - "authors": [ - "Langer, Marcel F." - ], - "email": "langer@fhi-berlin.mpg.de", - "title": "cmlkit: Toolkit for Machine Learning in Materials Science and Quantum Chemistry", - "description": "In this tutorial, we will get to know cmlkit, a python package for specifying, evaluating, and optimising machine learning models, and use it to compete in the Nomad 2018 Kaggle challenge.", - "notebook_name": "cmlkit.ipynb", - "url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-cmlkit", - "link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/cmlkit.ipynb", - "link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/cmlkit.ipynb", - "link_paper": "https://arxiv.org/pdf/2003.12081.pdf", - "link_doi_paper": "https://arxiv.org/abs/2003.12081", - "updated": "2021-01-14", - "flags": { - "featured": true, - "top_of_list": false - }, - "labels": { - "application_section": [ - "Tutorials for artificial-intelligence methods" - ], - "application_system": [ - "Transparent conducting oxides" - ], - "category": [ - "advanced_tutorial" - ], - "ai_methods": [ - "Supervised learning", - "Regression", - "Kernel ridge regression", - "SOAP", - "MBTR", - "Symmetry functions" - ], - "platform": [ - "jupyter" - ] - } - }, - { - "authors": [ - "Speckhard, Daniel", - "Leitherer, Andreas", - "Ghiringhelli, Luca M." - ], - "email": "speckhard@fhi-berlin.mpg.de", - "title": "Introduction to decision-trees methods", - "description": "In this tutorial we will introduce decision trees. We go through a toy model introducing the SKLearn API. We then discuss step by step the different theoretical aspects of trees. We then move to training a regression tree and classification tree on different datasets related to materials science. We end the tutorial by covering random forests and bagging classfiers.", - "notebook_name": "decision_tree.ipynb", - "url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-decision-tree", - "link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/decision_tree.ipynb", - "link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/decision_tree.ipynb", - "link_video": "https://www.youtube.com/watch?v=YBy9STVaqvU", - "updated": "2020-12-08", - "flags": { - "featured": true, - "top_of_list": false - }, - "labels": { - "application_section": [ - "Tutorials for artificial-intelligence methods" - ], - "application_system": [ - "Images", - "Metals", - "Insulators", - "matbench_expt_is_metal" - ], - "category": [ - "beginner_tutorial" - ], - "ai_methods": [ - "Supervised learning", - "Regression", - "Classification", - "Decision tree", - "Random forest", - "Bagging classifier", - "Atomic features" - ], - "platform": [ - "jupyter" - ] - } - }, - { - "authors": [ - "Sbail\u00f2, Luigi", - "Ghiringhelli, Luca M." - ], - "email": "sbailo@fhi-berlin.mpg.de", - "title": "Introduction to clustering", - "description": "In this tutorial, we introduce to the most popular clustering algorithms. We focus on partitioning, hierarchical and density-based clustering algorithms. The methods are tested on synthetic datasets of increasing complexity", - "notebook_name": "clustering_tutorial.ipynb", - "url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-clustering-tutorial", - "link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/clustering_tutorial.ipynb", - "link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/clustering_tutorial.ipynb", - "updated": "2021-01-21", - "flags": { - "featured": true, - "top_of_list": false - }, - "labels": { - "application_section": [ - "Tutorials for artificial-intelligence methods" - ], - "application_system": [ - "Synthetic data" - ], - "category": [ - "beginner_tutorial" - ], - "ai_methods": [ - "Unsupervised learning", - "Clustering", - "k-means", - "Hierarchical clustering", - "DBSCAN", - "HDBSCAN" - ], - "platform": [ - "jupyter" - ] - } - }, - { - "authors": [ - "Sbail\u00f2, Luigi", - "Ghiringhelli, Luca M." - ], - "email": "sbailo@fhi-berlin.mpg.de", - "title": "Introduction to exploratory analysis (unsupervised learning) of materials spaces", - "description": "Exploratory analyses make use of unsupervised learning techniques to extract information from unknown datasets. In this tutorial, we make use of some of the most popular clustering and dimension reduction algorithms to analyze a dataset composed of 82 octet-binary compounds.", - "notebook_name": "exploratory_analysis.ipynb", - "url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-exploratory-analysis", - "link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/exploratory_analysis.ipynb", - "link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/exploratory_analysis.ipynb", - "link_video": "https://www.youtube.com/watch?v=EJTjF9ehp7k", - "updated": "2021-02-04", - "flags": { - "featured": true, - "top_of_list": false - }, - "labels": { - "application_section": [ - "Tutorials for artificial-intelligence methods" - ], - "application_system": [ - "Octet binaries" - ], - "category": [ - "beginner_tutorial" - ], - "ai_methods": [ - "Clustering", - "Dimension reduction", - "k-means", - "Hierarchical clustering", - "DBSCAN", - "HDBSCAN", - "DenPeak", - "PCA", - "t-SNE", - "MDS" - ], - "platform": [ - "jupyter" - ] - } - }, - { - "authors": [ - "Arif, Mohammad-Yasin", - "Sbail\u00f2, Luigi", - "Ghiringhelli, Luca M." - ], - "email": "ghiringhelli@fhi-berlin.mpg.de", - "title": "Identifying domains of applicability of machine-Learning models for materials science", - "description": "In this tutorial, we present a method, based on subgroup discovery, for detecting domains of applicability (DA) of ML models within a materials class. The domain of applicability of an ML model is the region of input space where the model predicts the target property with the smallest uncertainty. The utility of this approach is demonstrated by analyzing three state-of-the-art ML models for predicting the formation energy of transparent conducting oxides.", - "notebook_name": "domain_of_applicability.ipynb", - "url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-domain-of-applicability", - "link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/domain_of_applicability.ipynb", - "link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/domain_of_applicability.ipynb", - "link_paper": " https://th.fhi-berlin.mpg.de/site/uploads/Publications/s41467-020-17112-9.pdf", - "link_doi_paper": "https://www.nature.com/articles/s41467-020-17112-9", - "updated": "2021-01-27", - "flags": { - "featured": true, - "top_of_list": false, - "paper": true - }, - "labels": { - "application_section": [ - "Timely artificial-intelligence applications to Materials Science" - ], - "application_system": [ - "Transparent conducting oxides" - ], - "category": [ - "advanced_tutorial" - ], - "ai_methods": [ - "Supervised learning", - "Regression", - "Subgroup discovery", - "Kernel ridge regression", - "SOAP", - "MBTR", - "n-gram" - ], - "platform": [ - "jupyter" - ] - } - }, - { - "authors": [ - "Leitherer, Andreas", - "Sbail\u00f2, Luigi", - "Ghiringhelli, Luca M." - ], - "email": "leitherer@fhi-berlin.mpg.de", - "title": "Introduction to multilayer perceptrons (deep neural networks)", - "description": "In this tutorial, we discuss how multilayer perceptrons, a standard neural-network architecture, can be employed for regression tasks. Specifically, we will use the ElemNet neural-network architecture to predict the volume per atom of inorganic compounds, where the Open Quantum Materials Database (OQMD) is used as a resource.", - "notebook_name": "nn_regression.ipynb", - "url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-tutorial-template", - "link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/nn_regression.ipynb", - "link_public": "https://nomad-lab.eu/prod/analytics/public/user-redirect/notebooks/tutorials/nn_regression.ipynb", - "link_video": "https://www.youtube.com/watch?v=U0lI5n8Hleo", - "updated": "2021-01-29", - "flags": { - "featured": true, - "top_of_list": false - }, - "labels": { - "application_section": [ - "Materials property prediction" - ], - "application_system": [ - "Inorganic compounds", - "OQMD database" - ], - "category": [ - "beginner_tutorial" - ], - "ai_methods": [ - "Supervised learning", - "Regression", - "Neural networks", - "Deep neural networks", - "Atomic features" - ], - "platform": [ - "jupyter" - ] - } - }, - { - "authors": [ - "Sbail\u00f2, Luigi", - "Purcell, Thomas A. R.", - "Ghiringhelli, Luca M.", - "Scheffler, Matthias" - ], - "email": "ghiringhelli@fhi-berlin.mpg.de", - "title": "Discovery of new topological insulators in alloyed tetradymites", - "description": "Learn how to find descriptive parameters (short formulas) that predict whether alloyed materials are topological or trivial insulators, using the example of tetradymites. This notebook is based on the algorithm 'sure independence screening and sparsifying operator' (SISSO) that enables to search for optimal descriptor by scanning huge feature spaces.", - "notebook_name": "tetradymite_PRM2020.ipynb", - "url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-tetradymite-PRM2020", - "link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/tetradymite_PRM2020.ipynb", - "link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/tetradymite_PRM2020.ipynb", - "link_paper": "https://th.fhi.mpg.de/site/uploads/Publications/PhysRevMaterials.4.034204.pdf", - "link_doi_paper": "https://journals.aps.org/prmaterials/abstract/10.1103/PhysRevMaterials.4.034204", - "updated": "2020-15-09", - "flags": { - "featured": true, - "top_of_list": false - }, - "labels": { - "application_section": [ - "Timely artificial-intelligence applications to Materials Science" - ], - "application_system": [ - "Tetradymites", - "Topological insulators" - ], - "category": [ - "advanced_tutorial" - ], - "ai_methods": [ - "Supervised learning", - "Classification", - "Symbolic regression", - "Features selection", - "Atomic features", - "SISSO" - ], - "platform": [ - "jupyter" - ] - } - }, - { - "authors": [ - "Leitherer, Andreas", - "Ziletti, Angelo", - "Ghiringhelli, Luca M." - ], - "email": "leitherer@fhi-berlin.mpg.de", - "title": "ARISE - Robust recognition and exploratory analysis of crystal structures via Bayesian deep learning", - "description": "In this tutorial, we give an introduction to ARISE (ARtificial-Intelligence-based Structure Evaluation), a powerful Bayesian-deep-neural-network tool for the recognition of atomistic structures (A. Leitherer, A. Ziletti, and L.M. Ghiringhelli, Nat. Commun. 12, 6234, 2021). ARISE is robust to structural noise and can treat more than 100 crystal structures, a number that can be extended on demand. While being trained on ideal structures only, ARISE correctly characterizes strongly perturbed single- and polycrystalline systems, from both synthetic and experimental resources. The probabilistic nature of the Bayesian-deep-learning model allows to obtain principled uncertainty estimates. By applying unsupervised learning to the internal neural-network representations, one can reveal grain boundaries and (unapparent) structural regions sharing easily interpretable geometrical properties.", - "notebook_name": "ARISE.ipynb", - "url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-tutorial-template", - "link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/ARISE.ipynb", - "link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/ARISE.ipynb", - "link_paper": "https://www.nature.com/articles/s41467-021-26511-5.pdf", - "link_doi_paper": "https://www.nature.com/articles/s41467-021-26511-5", - "updated": "2021-03-22", - "flags": { - "featured": true, - "top_of_list": false, - "paper": true - }, - "labels": { - "application_section": [ - "Timely artificial-intelligence applications to Materials science" - ], - "application_system": [ - "Grain boundaries", - "Binaries", - "Ternaries", - "Low-dimensional materials" - ], - "category": [ - "advanced_tutorial" - ], - "ai_methods": [ - "Supervised learning", - "Neural networks", - "Bayesian deep learning", - "Unsupervised learning", - "Clustering", - "Dimension reduction", - "HDBSCAN", - "UMAP", - "SOAP" - ], - "platform": [ - "jupyter" - ] - } - }, - { - "authors": [ - "Langer, Marcel F." - ], - "email": "langer@fhi-berlin.mpg.de", - "title": "Introduction to kernel ridge regression for materials-property prediction", - "description": "In this tutorial, we will explore the application of kernel ridge regression to the prediction of materials properties. We will begin with a largely informal, pragmatic introduction to kernel ridge regression, including a rudimentary implementation, in order to become familiar with the basic terminology and considerations. We will then discuss representations, and re-trace the NOMAD 2018 Kaggle challenge.", - "notebook_name": "krr4mat.ipynb", - "url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-krr4mat", - "link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/krr4mat.ipynb", - "link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/krr4mat.ipynb", - "link_video": "https://www.youtube.com/watch?v=H_MVlljpYHw", - "updated": "2020-12-15", - "flags": { - "featured": true, - "top_of_list": false - }, - "labels": { - "application_section": [ - "Tutorials for artificial-intelligence methods" - ], - "application_system": [ - "Transparent conducting oxides" - ], - "category": [ - "beginner_tutorial" - ], - "ai_methods": [ - "Supervised learning", - "Regression", - "Kernel ridge regression", - "SOAP" - ], - "platform": [ - "jupyter" - ] - } - }, - { - "authors": [ - "Mazheika, Aliaksei", - "Sbail\u00f2, Luigi", - "Ghiringhelli, Luca M.", - "Levchenko, Sergey", - "Scheffler, Matthias" - ], - "email": "mazheika@fhi-berlin.mpg.de", - "title": "Subgroup discovery of catalysts\u2019 genes for carbon-dioxide activation on semiconductor oxides", - "description": "In this interactive tutorial we show the application of subgroup discovery for the search for indicators of carbond-dioxide activation with the aim of its further conversion.", - "notebook_name": "CO2_SGD.ipynb", - "url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-co2-sgd-tutorial", - "link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/CO2_SGD.ipynb", - "link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/CO2_SGD.ipynb", - "link_paper": "https://arxiv.org/pdf/1912.06515", - "link_doi_paper": "https://arxiv.org/abs/1912.06515", - "updated": "2021-08-26", - "flags": { - "featured": true, - "top_of_list": false - }, - "labels": { - "application_section": [ - "Timely artificial-intelligence applications to Materials Science" - ], - "application_system": [ - "CO2 activation", - "Heterogeneous catalysis", - "Semicondictor oxides" - ], - "category": [ - "advanced_tutorial" - ], - "ai_methods": [ - "Subgroup discovery", - "Decision trees" - ], - "platform": [ - "jupyter" - ] - } - }, - { - "authors": [ - "Foppa, Lucas", - "Ghiringhelli, Luca M." - ], - "email": "foppa@fhi-berlin.mpg.de", - "title": "Introduction to subgroup discovery: Identifying outstanding transition-metal-alloy catalysts", - "description": "This tutorial introduces, by means of two applications in materials science, the artificial-intelligence technique subgroup discovery.", - "notebook_name": "sgd_alloys_oxygen_reduction_evolution.ipynb", - "url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-sgd-alloys-oxygen-reduction-evolution", - "link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/sgd_alloys_oxygen_reduction_evolution.ipynb", - "link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/sgd_alloys_oxygen_reduction_evolution.ipynb", - "link_paper": "https://link.springer.com/content/pdf/10.1007/s11244-021-01502-4.pdf", - "link_doi_paper": "https://doi.org/10.1007/s11244-021-01502-4", - "updated": "2021-10-28", - "flags": { - "featured": true, - "top_of_list": false - }, - "labels": { - "application_section": [ - "Timely artificial-intelligence applications to Materials Science" - ], - "application_system": [ - "Heterogeneous catalysis", - "Oxygen evolution reaction", - "Oxygen reduction reaction", - "Scaling relations" - ], - "category": [ - "intermediate_tutorial" - ], - "ai_methods": [ - "Subgroup discovery", - "Decision tree" - ], - "platform": [ - "jupyter" - ] - } - }, - { - "authors": [ - "Naik ,Aakash A.", - "Ghiringhelli, Luca M." - ], - "email": "ghiringhelli@fhi-berlin.mpg.de", - "title": "Atomic-features-package usage demonstration", - "description": "In this tutorial, we show how the atomic-features-package can be accessed and used to explore the atomic features form various sources and to prepare the input features for machine-learning studies.", - "notebook_name": "atomic_features.ipynb", - "url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-atomic-features", - "link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/atomic_features.ipynb", - "link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/atomic_features.ipynb", - "updated": "2021-12-07", - "labels": { - "application_system": [ - "Atoms" - ], - "category": [ - "query_tutorial" - ], - "platform": [ - "jupyter" - ], - "ai_methods": [ - "" - ] - } - }, - { - "authors": [ - "Foppa, Lucas", - "Hassanzada, Qaem", - "Bartel, Christopher", - "Purcell, Thomas", - "Sbail\u00f2, Luigi", - "Ghiringhelli, Luca M." - ], - "email": "ghiringhelli@fhi-berlin.mpg.de", - "title": "Finding a tolerance factor to predict perovskite stability with SISSO", - "description": "This tutorial shows how a tolerance factor for predicting perovskite stability can be learned from data with the sure-independece-screening-and-sparsifying-operator (SISSO) descriptor-identification approach.", - "notebook_name": "perovskites_tolerance_factor.ipynb", - "url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-perovskite-tolerance-factor", - "link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/perovskites_tolerance_factor.ipynb", - "link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/perovskites_tolerance_factor.ipynb", - "link_paper": "https://advances.sciencemag.org/content/advances/5/2/eaav0693.full.pdf", - "link_doi_paper": "https://doi.org/10.1126/sciadv.aav0693", - "updated": "2022-05-18", - "flags": { - "featured": true, - "top_of_list": false, - "paper": true - }, - "labels": { - "application_section": [ - "Timely artificial-intelligence applications to materials science" - ], - "category": [ - "advanced_tutorial" - ], - "application_system": [ - "Perovskite" - ], - "ai_methods": [ - "Supervised learning", - "Classification", - "Symbolic regression", - "Compressed sensing", - "SISSO", - "Decision tree", - "Features selection", - "Atomic features" - ], - "platform": [ - "jupyter" - ] - } - }, - { - "authors": [ - "Foppa, Lucas", - "Ghiringhelli, Luca M.", - "Scheffler, Matthias" - ], - "email": "foppa@fhi-berlin.mpg.de", - "title": "Learning Design Rules for Catalysts from High-Throughput Experimentation and Theory via Subgroup Discovery", - "description": "This tutorial explores the application of subgroup discovery (SGD) to an experimental-theoretical data set in order to identify rules on key physicochemical parameters that describe the materials and environmental conditions associated with outstanding performance in heterogeneous catalysis.", - "notebook_name": "sgd_propylene_oxidation_hte.ipynb", - "url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-sgd-propylene-oxidation-hte", - "link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/sgd_propylene_oxidation_hte.ipynb", - "link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/sgd_propylene_oxidation_hte.ipynb", - "link_paper": "https://pubs.acs.org/doi/10.1021/acscatal.1c04793", - "link_doi_paper": "https://pubs.acs.org/doi/10.1021/acscatal.1c04793", - "updated": "2022-2-09", - "flags": { - "featured": true, - "top_of_list": false - }, - "labels": { - "application_section": [ - "Timely artificial-intelligence applications to Materials Science" - ], - "application_system": [ - "Heterogeneous catalysis" - ], - "category": [ - "advanced_tutorial" - ], - "ai_methods": [ - "Subgroup discovery" - ], - "platform": [ - "jupyter" - ] - } - }, - { - "authors": [ - "Gabaj, \u0160imon", - "Kuban, Martin", - "Rigamonti, Santiago", - "Draxl, Claudia" - ], - "email": "gabajsim@physik.hu-berlin.de", - "title": "Electronic density-of-states similarity search", - "description": "This notebook shows how to compute the similarity of materials in terms of their electronic density-of-states (DOS), from data retrieved from the NOMAD Archive.", - "notebook_name": "dos_similarity_search.ipynb", - "url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-dos-similarity-search", - "link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/dos_similarity_search.ipynb", - "link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/dos_similarity_search.ipynb", - "updated": "2022-30-03", - "flags": { - "featured": true, - "top_of_list": false, - "paper": false - }, - "labels": { - "application_section": [ - "Tutorials for artificial-intelligence methods" - ], - "application_system": [ - "Binaries", - "Ternaries" - ], - "category": [ - "intermediate_tutorial" - ], - "ai_methods": [ - "Similarity search", - "Fingerprint" - ], - "platform": [ - "jupyter" - ] - } - }, - { - "authors": [ - "Foppa, Lucas", - "Purcell, Thomas A. R.", - "Levchenko, Sergey V.", - "Scheffler, Matthias", - "Ghiringhelli, Luca M." - ], - "email": "foppa@fhi-berlin.mpg.de", - "title": "Hierarchical symbolic regression for identifying key physical parameters correlated with materials properties", - "description": "In this notebook, we describe a hierarchical symbolic-regression approach for finding, based on data, analytical expressions relating materials properties to simpler physicochemical parameters associated with the underlying processes governing the properties.", - "notebook_name": "hierarchical_sisso.ipynb", - "url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-hierarchical-sisso", - "link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/hierarchical_sisso.ipynb", - "link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/hierarchical_sisso.ipynb", - "link_paper": "https://journals.aps.org/prl/pdf/10.1103/PhysRevLett.129.055301", - "link_doi_paper": "https://journals.aps.org/prl/pdf/10.1103/PhysRevLett.129.055301", - "updated": "2022-8-3", - "flags": { - "featured": true, - "top_of_list": false - }, - "labels": { - "application_section": [ - "Timely artificial-intelligence applications to Materials Science" - ], - "application_system": [ - "Bulk properties", - "Perovskites" - ], - "category": [ - "advanced_tutorial" - ], - "ai_methods": [ - "Supervised learning", - "Regression", - "Compressed sensing", - "Symbolic regression", - "SISSO", - "Features selection", - "Atomic features" - ], - "platform": [ - "jupyter" - ] - } - } - ] - }, "exampleUploads": { "Basic examples": { "theory": { diff --git a/gui/tests/env.js b/gui/tests/env.js index 5748c7314569e50bb60e5e80933df697d9f38e33..79531d86f72b65f8e378718e960d94169f4cdb61 100644 --- a/gui/tests/env.js +++ b/gui/tests/env.js @@ -6,7 +6,6 @@ window.nomadEnv = { "keycloakClientId": "nomad_public", "debug": false, "encyclopediaBase": "https://nomad-lab.eu/prod/rae/encyclopedia/#", - "aitoolkitEnabled": true, "oasis": false, "version": {}, "globalLoginRequired": false, @@ -2620,6 +2619,282 @@ window.nomadEnv = { "parsers/vasp" ], "options": { + "nomad_aitoolkit.apps:aitoolkit": { + "id": "nomad_aitoolkit.apps:aitoolkit", + "entry_point_type": "app", + "name": "AI Toolkit notebooks", + "description": "App defined using the new plugin mechanism.", + "plugin_package": "nomad_aitoolkit", + "app": { + "label": "AI Toolkit Notebooks", + "path": "ai-toolkit", + "resource": "entries", + "category": "Tools", + "description": "Search AI toolkit notebooks", + "pagination": { + "order_by": "upload_create_time", + "order": "desc", + "page_size": 20 + }, + "columns": { + "include": [ + "entry_id", + "entry_type", + "authors", + "data.name#nomad_aitoolkit.schema.package.AIToolkitNotebook", + "data.category#nomad_aitoolkit.schema.package.AIToolkitNotebook", + "data.platform#nomad_aitoolkit.schema.package.AIToolkitNotebook", + "data.date#nomad_aitoolkit.schema.package.AIToolkitNotebook" + ], + "options": { + "entry_id": { + "align": "left" + }, + "entry_type": { + "label": "Entry type", + "align": "left" + }, + "authors": { + "label": "Authors", + "align": "left" + }, + "data.name#nomad_aitoolkit.schema.package.AIToolkitNotebook": { + "label": "Name", + "align": "left" + }, + "data.category#nomad_aitoolkit.schema.package.AIToolkitNotebook": { + "label": "Category", + "align": "left" + }, + "data.platform#nomad_aitoolkit.schema.package.AIToolkitNotebook": { + "label": "Platform", + "align": "left" + }, + "data.date#nomad_aitoolkit.schema.package.AIToolkitNotebook": { + "label": "Last update", + "align": "left", + "format": { + "decimals": 3, + "mode": "date" + } + } + }, + "selected": [ + "data.name#nomad_aitoolkit.schema.package.AIToolkitNotebook", + "authors", + "data.category#nomad_aitoolkit.schema.package.AIToolkitNotebook", + "data.date#nomad_aitoolkit.schema.package.AIToolkitNotebook" + ] + }, + "rows": { + "actions": { + "options": { + "launch": { + "description": "Launch Jupyter notebook", + "type": "url", + "path": "data.references[?kind=='hub'].uri" + } + }, + "enabled": true + }, + "details": { + "enabled": true + }, + "selection": { + "enabled": true + } + }, + "filter_menus": { + "options": { + "custom_quantities": { + "label": "Notebooks", + "level": 0, + "size": "l" + }, + "author": { + "label": "Author", + "level": 0, + "size": "m" + }, + "metadata": { + "label": "Visibility / IDs", + "level": 0, + "size": "s" + } + } + }, + "filters": { + "include": [ + "*#nomad_aitoolkit.schema.package.AIToolkitNotebook" + ], + "exclude": [ + "*#nomad.datamodel.metainfo.eln.BasicEln" + ] + }, + "dashboard": { + "widgets": [ + { + "type": "terms", + "layout": { + "xxl": { + "h": 6, + "w": 6, + "x": 0, + "y": 0, + "minH": 3, + "minW": 3 + }, + "xl": { + "h": 6, + "w": 6, + "x": 0, + "y": 0, + "minH": 3, + "minW": 3 + }, + "lg": { + "h": 6, + "w": 6, + "x": 0, + "y": 0, + "minH": 3, + "minW": 3 + }, + "md": { + "h": 6, + "w": 6, + "x": 0, + "y": 0, + "minH": 3, + "minW": 3 + }, + "sm": { + "h": 6, + "w": 6, + "x": 0, + "y": 0, + "minH": 3, + "minW": 3 + } + }, + "quantity": "data.category#nomad_aitoolkit.schema.package.AIToolkitNotebook", + "scale": "linear", + "showinput": true + }, + { + "title": "Methods", + "type": "terms", + "layout": { + "xxl": { + "h": 6, + "w": 6, + "x": 6, + "y": 0, + "minH": 3, + "minW": 3 + }, + "xl": { + "h": 6, + "w": 6, + "x": 6, + "y": 0, + "minH": 3, + "minW": 3 + }, + "lg": { + "h": 6, + "w": 6, + "x": 6, + "y": 0, + "minH": 3, + "minW": 3 + }, + "md": { + "h": 6, + "w": 6, + "x": 6, + "y": 0, + "minH": 3, + "minW": 3 + }, + "sm": { + "h": 6, + "w": 6, + "x": 6, + "y": 0, + "minH": 3, + "minW": 3 + } + }, + "quantity": "data.methods.name#nomad_aitoolkit.schema.package.AIToolkitNotebook", + "scale": "linear", + "showinput": true + }, + { + "title": "Systems", + "type": "terms", + "layout": { + "xxl": { + "h": 6, + "w": 6, + "x": 12, + "y": 0, + "minH": 3, + "minW": 3 + }, + "xl": { + "h": 6, + "w": 6, + "x": 12, + "y": 0, + "minH": 3, + "minW": 3 + }, + "lg": { + "h": 6, + "w": 6, + "x": 12, + "y": 0, + "minH": 3, + "minW": 3 + }, + "md": { + "h": 6, + "w": 6, + "x": 12, + "y": 0, + "minH": 3, + "minW": 3 + }, + "sm": { + "h": 6, + "w": 6, + "x": 12, + "y": 0, + "minH": 3, + "minW": 3 + } + }, + "quantity": "data.systems.name#nomad_aitoolkit.schema.package.AIToolkitNotebook", + "scale": "linear", + "showinput": true + } + ] + }, + "filters_locked": { + "section_defs.definition_qualified_name": [ + "nomad_aitoolkit.schema.package.AIToolkitNotebook" + ] + } + } + }, + "nomad_aitoolkit.schema:package": { + "id": "nomad_aitoolkit.schema:package", + "entry_point_type": "schema_package", + "name": "AIToolkit", + "description": "Describes the basic schemas for AI Toolkit notebooks.", + "plugin_package": "nomad_aitoolkit" + }, "nomad_porous_materials.apps:mofapp": { "id": "nomad_porous_materials.apps:mofapp", "entry_point_type": "app", @@ -4219,6 +4494,18 @@ window.nomadEnv = { } }, "plugin_packages": { + "nomad_aitoolkit": { + "description": "Schema and app for AI Toolkit notebooks.", + "documentation": null, + "entry_points": [ + "nomad_aitoolkit.apps:aitoolkit", + "nomad_aitoolkit.schema:package" + ], + "homepage": null, + "name": "nomad_aitoolkit", + "repository": "https://github.com/FAIRmat-NFDI/nomad-aitoolkit", + "version": "0.1.0" + }, "nomad_porous_materials": { "description": "NOMAD plugin for porous materials", "documentation": null, diff --git a/gui/tests/nomad.yaml b/gui/tests/nomad.yaml index e8209f3ec3484d0a6bee8429c48dfa648172098a..e9acef54eef95f0ca672cf117555f1c1de576583 100644 --- a/gui/tests/nomad.yaml +++ b/gui/tests/nomad.yaml @@ -16,5 +16,4 @@ plugins: - schema/simulation/run - schema/simulation/workflow - parsers/vasp -services: - aitoolkit_enabled: true + diff --git a/nomad/cli/dev.py b/nomad/cli/dev.py index fc26cfc4235469886cc451c5f9653db2f494facb..9aa482ec6ff2270e204b97b9f95618970aa8b830 100644 --- a/nomad/cli/dev.py +++ b/nomad/cli/dev.py @@ -86,7 +86,6 @@ def get_gui_artifacts_js() -> str: 'searchQuantities': _generate_search_quantities(), 'metainfo': _generate_metainfo(all_metainfo_packages), 'parserMetadata': code_metadata, - 'toolkitMetadata': _generate_toolkit_metadata(), 'exampleUploads': _generate_example_upload_metadata(), 'northTools': {k: v.dict() for k, v in config.north.tools.filtered_items()}, 'unitList': unit_list_json, @@ -242,7 +241,6 @@ def get_gui_config() -> str: 'encyclopediaBase': config.services.encyclopedia_base if config.services.encyclopedia_base else None, - 'aitoolkitEnabled': config.services.aitoolkit_enabled, 'oasis': config.oasis.is_oasis, 'version': config.meta.beta if config.meta.beta else {}, 'globalLoginRequired': config.oasis.allowed_users is not None, @@ -293,44 +291,6 @@ def example_upload_metadata(): print(json.dumps(_generate_example_upload_metadata(), indent=2)) -def _generate_toolkit_metadata() -> dict: - if not config.services.aitoolkit_enabled: - return {} - - import requests - import re - - modules = requests.get( - 'https://gitlab.mpcdf.mpg.de/api/v4/projects/3161/repository/files/.gitmodules/raw?ref=master' - ).text - - tutorials = [] - lines = modules.split('\n') - for line in lines: - match = re.match(r'\s*url = (.*)$', line) - if match: - url = match.group(1).replace('.git', '') + '/-/raw/master/metainfo.json' - response = requests.get(url) - if response.status_code != 200: - print('Could not get metadata for %s' % match.group(1), file=sys.stderr) - continue - try: - tutorials.append(response.json()) - except Exception: - print( - 'Could not get metadata for %s. Project is probably not public.' - % match.group(1), - file=sys.stderr, - ) - - return dict(tutorials=tutorials) - - -@dev.command(help='Generate toolkit tutorial metadata from analytics submodules.') -def toolkit_metadata(): - print(json.dumps(_generate_toolkit_metadata(), indent=2)) - - @dev.command( help=( 'Updates parser`s README files by combining a general template with ' diff --git a/nomad/config/defaults.yaml b/nomad/config/defaults.yaml index 65bea0682920bc76841865d0828d72acae6abba5..97b75748525178160bbb8530584dcbc7e50986d4 100644 --- a/nomad/config/defaults.yaml +++ b/nomad/config/defaults.yaml @@ -194,7 +194,6 @@ rfc3161_timestamp: server: http://zeitstempel.dfn.de services: admin_user_id: 00000000-0000-0000-0000-000000000000 - aitoolkit_enabled: false api_base_path: /fairdi/nomad/latest api_host: localhost api_port: 8000 diff --git a/nomad/config/models/config.py b/nomad/config/models/config.py index beb1a8241a0c1274c27c9277f2b6eaeaa38fa20a..7e3baee165248e8cbda38085200201579476cec0 100644 --- a/nomad/config/models/config.py +++ b/nomad/config/models/config.py @@ -132,13 +132,6 @@ class Services(ConfigBaseModel): This enables links to the given *encyclopedia* installation in the UI. """, ) - aitoolkit_enabled = Field( - False, - description=""" - If true, the UI will show a menu with links to the AI Toolkit notebooks on - `nomad-lab.eu`. - """, - ) optimade_enabled = Field( True, description="""If true, the app will serve the optimade API.""" ) diff --git a/ops/kubernetes/nomad-prod-staging.yaml b/ops/kubernetes/nomad-prod-staging.yaml index 97ffefc57dbd64f99cf0a5f16f7eac34a3b21314..6b738bafdaf3e67bbc6732114aaa8708edef64b1 100644 --- a/ops/kubernetes/nomad-prod-staging.yaml +++ b/ops/kubernetes/nomad-prod-staging.yaml @@ -22,6 +22,13 @@ nomad: north: enabled: true + plugins: + entry_points: + options: + 'nomad_aitoolkit.apps:aitoolkit': + upload_ids: + - hHA2lM5HRy2ZN_La6TPGjg + image: tag: "prod" diff --git a/scripts/install_default_plugins.sh b/scripts/install_default_plugins.sh index b44c725af8b1cbdcf5a9c9941501bf6025deca04..1b406e778af9ed85818bcf0424d65821d5df6f3d 100755 --- a/scripts/install_default_plugins.sh +++ b/scripts/install_default_plugins.sh @@ -1,4 +1,5 @@ #!/bin/bash pip install git+https://github.com/FAIRmat-NFDI/nomad-perovskite-solar-cells-database.git@f394d21abafeb659729af0c94e5f90949fce01c1 pip install git+https://github.com/FAIRmat-NFDI/nomad-porous-materials.git@795a53f35ffa52604cf7971c16cc3d4f9ce80f2f +pip install git+https://github.com/FAIRmat-NFDI/nomad-aitoolkit.git@70e6261c746e579ad0f177a965d16134efb50c35 pip install nomad-simulations==0.0.1