diff --git a/app/components/About/index.js b/app/components/About/index.js
index 804dca20..7bc970af 100644
--- a/app/components/About/index.js
+++ b/app/components/About/index.js
@@ -47,17 +47,18 @@ class About extends React.Component { // eslint-disable-line react/prefer-statel
License
-
+
- People
+ People and Contact
+ The platform is developed at the SUNCAT Center for Interface Science and Catalysis, SLAC National Accelerator Laboratory, Stanford University. Contact information for the primary people involved is provided below. For technical support please contact postdoc Kirsten Winther at winther@stanford.edu.
{Object.keys(people).map((name, i) => (
-
diff --git a/app/components/Apps/filteredApps.js b/app/components/Apps/filteredApps.js
index 0814bb9a..d066e726 100644
--- a/app/components/Apps/filteredApps.js
+++ b/app/components/Apps/filteredApps.js
@@ -44,9 +44,17 @@ class FilteredApps extends React.Component { // eslint-disable-line react/prefer
elevation={0}
>
-
- {getAppIcon(app.title)}
- {'\u00A0'}{app.title}
+ {(app.title === 'Activity Maps' || app.title === 'Scaling Relations' || app.title === 'Pourbaix Diagrams') ?
+
+ {getAppIcon(app.title)}
+ {'\u00A0'}{app.title}{' (Beta) '}
+
+ :
+
+ {getAppIcon(app.title)}
+ {'\u00A0'}{app.title}
+
+ }
{app.tooltip}
diff --git a/app/components/Publications/index.js b/app/components/Publications/index.js
index 68e683b3..8df9854e 100644
--- a/app/components/Publications/index.js
+++ b/app/components/Publications/index.js
@@ -82,115 +82,48 @@ class Publications extends React.Component { // eslint-disable-line react/prefer
this.clickPublication = this.clickPublication.bind(this);
this.loadPreviewCif = this.loadPreviewCif.bind(this);
this.backToList = this.backToList.bind(this);
-
- if (_.get(props, 'routeParams.pubId', '') !== '') {
- const publicationQuery = {
- ttl: 300,
- query: `{publications(pubId: "${this.state.pubId}") {
- edges {
- node {
- id
- pubId
- title
- authors
- pages
- volume
- journal
- doi
- pubtextsearch
- }
- }
-}}` };
-
- axios(newGraphQLRoot,
- {
- method: 'post',
- data: publicationQuery,
- }).then((response) => {
- this.setState({
- reference: _.get(response,
- 'data.data.publications.edges[0].node',
- {}),
- });
- });
- }
}
componentDidMount() {
- const mtimeQuery = `{systems(first:50, keyValuePairs: "~", jsonkey: "pub_id", distinct: true) {
-totalCount
- edges {
- node {
- keyValuePairs
- mtime
- }
- }
-}}`;
+ const yearQuery = '{publications { edges { node { year } } }}';
axios.post(newGraphQLRoot, {
- query: mtimeQuery,
+ query: yearQuery,
})
- .then((mtimeResponse) => {
- const mtimes = mtimeResponse.data.data.systems.edges.map((n) => (n.node.mtime));
- const sortedMtimes = mtimes.slice().sort((a, b) => b - a);
- const systemPubIds = mtimeResponse.data.data.systems.edges.map((n) => (JSON.parse(n.node.keyValuePairs).pub_id));
- let orderedPubIds = sortedMtimes.map((sortedMtime) => systemPubIds[mtimes.indexOf(sortedMtime)]);
- orderedPubIds = Array.from(new Set(orderedPubIds));
- const yearQuery = '{publications { edges { node { year } } }}';
- axios.post(newGraphQLRoot, {
- query: yearQuery,
- })
- .then((response) => {
- let years = response.data.data.publications.edges.map((n) => n.node.year);
- years = [...new Set(years)].sort().reverse().filter((x) => x !== null);
- this.setState({
- years,
- });
- years.map((year) => {
- const query = `{publications (year: ${year}) { edges { node { doi title year authors journal pages pubId pubtextsearch } } }}`;
- return axios.post(newGraphQLRoot, {
- query,
- })
- .then((yearResponse) => {
- let references = yearResponse.data.data.publications.edges
+ .then((response) => {
+ let years = response.data.data.publications.edges.map((n) => n.node.year);
+ years = [...new Set(years)].sort().reverse().filter((x) => x !== null);
+ this.setState({
+ years,
+ });
+ years.map((year) => {
+ const query = `{publications (year: ${year}, order: "-stime") { edges { node { doi title year authors journal volume number pages pubId pubtextsearch } } }}`;
+ return axios.post(newGraphQLRoot, {
+ query,
+ })
+ .then((yearResponse) => {
+ let references = yearResponse.data.data.publications.edges
.map((n) => (n.node));
- references = [...new Set(references)];
- const dois = yearResponse.data.data.publications.edges.map((n) => (n.node.doi));
- const titles = yearResponse.data.data.publications.edges.map((n) => (n.node.title));
- const pubIds = yearResponse.data.data.publications.edges.map((n) => (n.node.pubId));
- const pubIndices = [];
- orderedPubIds.map((orderedPubId) => {
- if (pubIds.includes(orderedPubId)) {
- pubIndices.push(pubIds.indexOf(orderedPubId));
- }
- return pubIndices;
- });
- pubIds.map((pubId, index) => {
- if (!orderedPubIds.includes(pubId)) {
- pubIndices.push(index);
- }
- return pubIndices;
- });
- const allReferences = this.state.references;
- const allDois = this.state.dois;
- const allTitles = this.state.titles;
- const allPubIds = this.state.pubIds;
+ references = [...new Set(references)];
+ const dois = yearResponse.data.data.publications.edges.map((n) => (n.node.doi));
+ const titles = yearResponse.data.data.publications.edges.map((n) => (n.node.title));
- allReferences[year] = pubIndices.map((p) => references[p]);
- allDois[year] = pubIndices.map((p) => dois[p]);
- allTitles[year] = pubIndices.map((p) => titles[p]);
- allPubIds[year] = pubIndices.map((p) => pubIds[p]);
+ const allReferences = this.state.references;
+ const allDois = this.state.dois;
+ const allTitles = this.state.titles;
- this.setState({
- references: allReferences,
- dois: allDois,
- titles: allTitles,
- });
- })
- .catch(() => {
- })
- ;
- });
+ allReferences[year] = references;
+ allDois[year] = dois;
+ allTitles[year] = titles;
+
+ this.setState({
+ references: allReferences,
+ dois: allDois,
+ titles: allTitles,
+ });
+ })
+ .catch(() => {
+ });
});
- });
+ });
}
backToList() {
this.setState({
@@ -391,7 +324,6 @@ totalCount
if (!notFound.every((x) => x)) {
return null;
}
-
if (this.state.titles[year][j] !== null) {
return (
diff --git a/app/components/SingleStructureView/index.js b/app/components/SingleStructureView/index.js
index ab8025ec..7b3a95d2 100644
--- a/app/components/SingleStructureView/index.js
+++ b/app/components/SingleStructureView/index.js
@@ -17,6 +17,7 @@ import {
} from 'utils/functions';
import GeometryCanvasWithOptions from 'components/GeometryCanvasWithOptions';
+import GraphQlbutton from 'components/GraphQlbutton';
const initialState = {
Formula: '',
@@ -39,10 +40,31 @@ class SingleStructureView extends React.Component { // eslint-disable-line react
constructor(props) {
super(props);
this.state = initialState;
+ this.state.printquery = `query{systems( uniqueId: "${this.props.selectedSystem.aseId}" ) {
+ edges {
+ node {
+ Formula
+ energy
+ numbers
+ initialMagmoms
+ magmoms
+ magmom
+ charges
+ momenta
+ calculator
+ keyValuePairs
+ calculatorParameters
+ publication {
+ title
+ authors
+ doi
+ }
+ }
+ }
+}}`;
}
render() {
const energy = this.props.selectedSystem.energy || this.state.energy || 0.0;
-
let x;
let y;
let z;
@@ -72,11 +94,11 @@ class SingleStructureView extends React.Component { // eslint-disable-line react
- Formula: {this.props.selectedSystem.Formula}
- DFT Total Energy: {energy.toFixed(2)} eV
+ {this.props.selectedSystem.energyCorrection !== 0 &&
+ - Energy correction: {this.props.selectedSystem.energyCorrection}
+ }
- DFT Code: {this.props.selectedSystem.DFTCode}
- DFT Functional: {this.props.selectedSystem.DFTFunctional}
- {_.isEmpty(this.props.selectedSystem.calculatorParameters) ? null :
- - DFT parameters: {this.props.selectedSystem.calculatorParameters}
- }
- Publication: {prettyPrintReference(this.props.selectedPublication)}
{_.isEmpty(this.props.selectedPublication.doi) ? null :
@@ -98,6 +120,9 @@ class SingleStructureView extends React.Component { // eslint-disable-line react
View all reactions in dataset
+
-
+ Open to view calculational details.
+
}
diff --git a/app/containers/EnergiesPage/Input.js b/app/containers/EnergiesPage/Input.js
index 8801fa12..2f082683 100644
--- a/app/containers/EnergiesPage/Input.js
+++ b/app/containers/EnergiesPage/Input.js
@@ -191,6 +191,7 @@ class EnergiesPageInput extends React.Component { // eslint-disable-line react/p
chemicalComposition
reactionSystems {
name
+ energyCorrection
aseId
}
}
@@ -273,7 +274,7 @@ class EnergiesPageInput extends React.Component { // eslint-disable-line react/p
A quick guide:
- Leave fields blank if you {"don't"} want to impose any restrictions.
- - For the Reactants and Product fields, choose the chemical species taking part in the left- and/or right hand side of the chemical reaction respectively. The phase of the molecules and elements can also be specified, such that {"'CO2gas'"} refers to CO2 in the gas phase, whereas {"'CO2*'"} refers to CO2 adsorbed on the surface.
+ - For the Reactants and Products fields, choose the chemical species taking part in the left- and/or right hand side of the chemical reaction respectively. The phase of the molecules and elements can also be specified, such that {"'CO2gas'"} refers to CO2 in the gas phase, whereas {"'CO2*'"} refers to CO2 adsorbed on the surface.
- In the Surface field, enter the (reduced) chemical composition of the surface, or a sum of elements that must be present, such as {"'Ag+'"} or {"'Ag+Sr'"}.
diff --git a/app/containers/EnergiesPage/MatchingReactions.js b/app/containers/EnergiesPage/MatchingReactions.js
index 81d69060..72c53954 100644
--- a/app/containers/EnergiesPage/MatchingReactions.js
+++ b/app/containers/EnergiesPage/MatchingReactions.js
@@ -129,13 +129,15 @@ class MatchingReactions extends React.Component { // eslint-disable-line react/p
loading: true,
});
this.props.saveLoading(true);
- let catappIds;
- let catappNames;
+ let cathubIds;
+ let cathubNames;
+ let catenergyCorrections;
if (typeof reaction.reactionSystems !== 'undefined' && reaction.reactionSystems !== null) {
- catappIds = (reaction.reactionSystems.map((x) => x.aseId));
- catappNames = (reaction.reactionSystems.map((x) => x.name));
+ cathubIds = (reaction.reactionSystems.map((x) => x.aseId));
+ cathubNames = (reaction.reactionSystems.map((x) => x.name));
+ catenergyCorrections = (reaction.reactionSystems.map((x) => x.energyCorrection));
} else {
- catappIds = {};
+ cathubIds = {};
snackbarActions.open('Scroll down for detailed structure.');
}
@@ -160,9 +162,10 @@ class MatchingReactions extends React.Component { // eslint-disable-line react/p
});
this.props.clearSystems();
- catappIds.map((key, index) => {
+ cathubIds.map((key, index) => {
let aseId = key;
- const name = catappNames[index];
+ const name = cathubNames[index];
+ const energyCorrection = catenergyCorrections[index];
if (typeof aseId === 'object') {
aseId = aseId[1];
}
@@ -189,6 +192,7 @@ class MatchingReactions extends React.Component { // eslint-disable-line react/p
node.Facet = reaction.facet;
node.publication = this.props.publication;
node.aseId = aseId;
+ node.energyCorrection = energyCorrection;
node.key = name;
node.full_key = node.Formula;
const ads = name.replace('star', ' @');
diff --git a/app/containers/HomePage/index.js b/app/containers/HomePage/index.js
index d0139dfc..701089db 100644
--- a/app/containers/HomePage/index.js
+++ b/app/containers/HomePage/index.js
@@ -125,53 +125,35 @@ export class HomePage extends React.PureComponent { // eslint-disable-line react
}, 2000
);
});
- axios.post(newGraphQLRoot, {
- query: `{systems(order:"mtime", last: 1) {
+ }
+ });
+ axios.post(newGraphQLRoot, {
+ query: `{publications(stime: 0, op: ">", order: "stime", last: 1) {
+ totalCount
edges {
node {
- Mtime
- publication {
- pubId
- }
+ pubId
+ Stime
+ title
+ authors
+ journal
+ pages
+ volume
+ year
+ doi
}
}
}}`,
- }).then((lpidResponse) => {
- const lastPubId = _.get(lpidResponse, 'data.data.systems.edges[0].node.publication[0].pubId');
- const lastPublicationTime = _.get(lpidResponse, 'data.data.systems.edges[0].node.Mtime');
- const pubTimeArray = lastPublicationTime.split(' ');
- pubTimeArray.splice(3, 1, ',');
- this.setState({
- lastPublicationTime: pubTimeArray.join(' ').replace(' ,', ''),
- });
- axios.post(newGraphQLRoot, {
- query: `{publications(pubId:"${lastPubId}") {
- edges {
- node { title authors journal pages volume year doi pubId }
- }
-}}`,
- }).then((lpResponse) => {
- this.setState({
- lastPublication: _.get(lpResponse, 'data.data.publications.edges[0].node'),
- });
- });
- });
- }
- });
- axios.post(newGraphQLRoot, { query: '{publications(first: 0) { totalCount edges { node { id } } }}' }).then((response) => {
- if (response.data.data.reactions === null) {
- this.setState({
- loading: false,
- error: true,
- });
- } else {
- this.setState({
- loading: false,
- publications: response.data.data.publications.totalCount,
- });
- }
+ }).then((lpidResponse) => {
+ const lastPublicationTime = _.get(lpidResponse, 'data.data.publications.edges[0].node.Stime');
+ const pubTimeArray = lastPublicationTime.split(' ');
+ pubTimeArray.splice(3, 1, ',');
+ this.setState({
+ lastPublicationTime: pubTimeArray.join(' ').replace(' ,', ''),
+ lastPublication: _.get(lpidResponse, 'data.data.publications.edges[0].node'),
+ publications: _.get(lpidResponse, 'data.data.publications.totalCount'),
+ });
});
-
axios.post(newGraphQLRoot, {
query: '{publications (authors:"~", distinct: true) { edges { node { authors } } }}',
}).then((response) => {
diff --git a/app/utils/constants.js b/app/utils/constants.js
index 3c4b82ae..5f0ee1e9 100644
--- a/app/utils/constants.js
+++ b/app/utils/constants.js
@@ -102,8 +102,6 @@ module.exports = {
'http://suncat.stanford.edu/people/kirsten-winther'],
'Max Hoffmann': ['Software Engineer. Former postdoc, SLAC National Accelerator Laboratory',
'http://suncat.stanford.edu/people/max-hoffmann'],
- 'Jens N\u00F8rskov': ['Villum Kann Rasmussen Professor, Technical University of Denmark',
- 'http://www.staff.dtu.dk/jkno'],
'Jacob Boes': ['Postdoc, SLAC National Accelerator Laboratory',
'http://suncat.stanford.edu/people/jacob-russell-boes'],
'Osman Mamun': ['Postdoc, SLAC National Accelerator Laboratory',
diff --git a/app/utils/functions.js b/app/utils/functions.js
index 9c9e0a5e..422bb5e1 100644
--- a/app/utils/functions.js
+++ b/app/utils/functions.js
@@ -86,10 +86,11 @@ export const prettyPrintReference = (ref) =>
{restoreSC(author)}
)).reduce((prev, curr) => [prev, '; ', curr]))}. : null }
- {(ref.journal !== '' && typeof ref.journal !== 'undefined' && ref.journal !== null) ? {ref.journal}, : null }
- {(ref.volume !== '' && typeof ref.volume !== 'undefined' && ref.volume !== null) ? {ref.volume} : null}
- {(ref.year !== '' && typeof ref.year !== 'undefined' && ref.year !== null) ? ({ref.year}). : null}
- {(ref.pages !== '' && typeof ref.pages !== 'undefined' && ref.pages !== null) ? {ref.pages}. : null}
+ {(ref.journal !== '' && typeof ref.journal !== 'undefined' && ref.journal !== null) ? {ref.journal}. : null }
+ {(ref.volume !== '' && typeof ref.volume !== 'undefined' && ref.volume !== null) ? {ref.volume} : null}
+ {(ref.number !== '' && typeof ref.number !== 'undefined' && ref.number !== null) ? {ref.number} : null}
+ {(ref.pages !== '' && typeof ref.pages !== 'undefined' && ref.pages !== null) ? {', '}{ref.pages} : null}
+ {(ref.year !== '' && typeof ref.year !== 'undefined' && ref.year !== null) ? ({ref.year}) : null}
);