Skip to content

Commit

Permalink
Introduce Graph format to Ketcher (#55)
Browse files Browse the repository at this point in the history
* Remove unused style | .eslint

* struct schema + validation test

* tmp - don't see now

* rgroup, sgroup to schema

* atoms + bonds to graph

* sgroups (w/o DATA) + rgroups | fragments

* rgroups TMP

* Correct schemes: Add `rg-label` with ref to Rgroup. Add RGroup schema. Add rootSchema. Add validation example.

* Correct writing RGroups to Graph

* atom-list, data-sgroups

* graph parser v1.0.0-alpha

* Root field to Graph

* Refactor SGroupForest

* remove molecule ref
* remove validate method (checkOverlapping do his work before him)

* graph parser v1.0.1-alpha
code simplification +  rgroups merging

* tmp

* rxn

* Add new class `Fragment` for storage enhanced stereo flags

Now, struct.frags - Map of `Fragment`;
Fragment has methods for updating:
- enhancedStereoFlag
- marks in stereo atoms

* update struct.mergeInto() with frag.clone();

* rxn

* Add op.UpdateStereoAtom

* add op.UpdateStereoAtom call to `fromBondAddition`

* update `stereo` field in Struct.Bond
* add `stereoParity` field for Struct.Atom

* Add stereoChemistry info to GraphFormat

* [tmp] fromBondStereoUpdate...

* Actions for Deletions refactor. Add UpdateStereo to FragmentSplit

* [tmp] Upgrage operation (now undo not working)

* func instead 2 switchers

* works TMP

* Update StereoFrag operations | Split op to several files [WIP]

* Atom, Bond, Fragment Deletion actions with stereo works correctly

* eslint quiet option

* [eslint] Correct SwitchCase indent

* test + watcher + fixes

* [WIP] Add Enhanced Stereo dialog

* [WIP] First prototype of change atom marks

* [WIP] small corrections

* [WIP] Add Graph format to Save dialog

* tests

* Add enhanced Fragment and Atom dialogs | Refactor enhanced tool

* Chiral button was hidden

* [tmp] add stereo label to reatom.show()

* [tmp] 1 enhanced dialog, default stereo label change to AND-1

* Enhanced flag move

* tests for validator + true file structure

* Absolute label always w/o group number

* Reatom and ReEnhancedFlag corrections

* tests for validator

* StereoLabel info to atom property

* correct fragment operations
* it has bug with undo after delete atom

* Correct struct of Internal format

* Erace actions correct

* Remove Chiral flag. Update V2000, V3000 reading

* Small clean

* graph --> struct parser done
EPMLSOPKET-1316

* Fix after merge

* add header to graph --> struct parser

* Graph opening
EPMLSOPKET-1317

* Copy/paste internal format support

* sgroup display
EPMLSOPKET-1319

* Fix bugs with Rgroup and merging operations

* New molecule flags correct

* plus hotfix + sgroup display (2 fields: display and attached)
EPMLSOPKET-1321 (plus hotfix)

* sgroup display fix fields (2 fields: display and *placement)

* Sgroup parser done

* Help information already has table with supported formats

* add missing test for rxnToStruct.test.js

* fix issue related to io.js

* change some settings

* fix IO test

* fix and add new tests to moleculeToStruct.test.js

* fix bug with rgroups.mol

* add new test blocks to moleculeToStruct.test.js

* rename scripts in package.json

* delete unnecessary gitlab file

* remove gulp lint task

* remove TODO and empty lines

* Update src/script/chem/molfile/molfile.js

Co-authored-by: Nikita Ryzhov <vesdet@gmail.com>

* fix molfile.js

* delete unnecessary todos

* set Copyright to 2020 for new files

* add enhanced-stereo icon

* add new test structures

* fix moleculeToStruct test

* change enhanced-stereo icon

* set Copyright to 2020 for op.js

* fix

* fix

* delete unnecessary TODO

* delete loadStruct from index.js

Co-authored-by: Nikita_Ryzhov <Nikita_Ryzhov@epam.com>
Co-authored-by: Damir_Giliazetdinov <Damir_Giliazetdinov@epam.com>
Co-authored-by: Anna Kuznetsova1 <Anna_Kuznetsova1@epam.com>
Co-authored-by: Nikita Ryzhov <vesdet@gmail.com>
  • Loading branch information
5 people authored Oct 22, 2020
1 parent 3d44c60 commit ff09fbd
Show file tree
Hide file tree
Showing 225 changed files with 14,511 additions and 7,067 deletions.
13 changes: 13 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"env": {
"test": {
"presets": ["@babel/preset-env"],
"plugins": [
["transform-builtin-extend", {
"globals": ["Set", "Map"]
}]
]
}
}
}

13 changes: 6 additions & 7 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
"settings": {
"react": { "pragma": "h" }
},
"globals": {
"fetch": true,
"document": true,
"window": true,
"localStorage": true
"env": {
"browser": true,
"node": true,
"es6": true,
"jest": true
},
"rules": {
"comma-dangle": ["error", "never"],
"curly": ["error", "multi-or-nest", "consistent"],
"dot-notation": "off",
"indent": ["error", "tab"],
"indent": ["error", "tab", { "SwitchCase": 1 }],
"import/prefer-default-export": "off",
"func-names": "off",
"function-paren-newline": ["error", "consistent"],
Expand Down Expand Up @@ -53,7 +53,6 @@
"radix": "off",
"spaced-comment": ["error", "always", { "exceptions": ["*"] }],
"unicode-bom": ["error", "never"],

/* jsx */
"react/jsx-first-prop-new-line": ["error", "multiline"],
"react/jsx-indent": ["error", "tab"],
Expand Down
66 changes: 0 additions & 66 deletions .gitlab-ci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2018 EPAM Systems
Copyright 2020 EPAM Systems

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
17 changes: 8 additions & 9 deletions doc/help.md
Original file line number Diff line number Diff line change
Expand Up @@ -486,15 +486,14 @@ To create a user template:
Ketcher supports the following molecular formats that can be entered
either manually or from files:

* MDL Molfile or RXN file;

* Daylight SMILES (Server mode only);

* Daylight SMARTS (Server mode only);

* InChi string (Server mode only);

* CML file (Server mode only).
| | Graph | MDL | Daylight SMILES | Daylight SMARTS | InChi | CML |
| ---------------------------- |:-------:|:-----:|:------------------:|:-------------------:|:---------:|:------:|
| Offline mode | + | + | - | - | - | - |
| Reactions | + | + | + | - | - | + |
| R-Groups | + | + | - | - | - | - |
| S-Groups | + | + | - | - | - | + |
| Standalone (Open/Save as...) | + | + | - | - | - | - |
| Valency | + | + | + | + | + | - |

You can use the **Open…** and **Save As…** buttons of the _Main_
toolbar to import a molecule from a molecular file or save it to a
Expand Down
2 changes: 1 addition & 1 deletion gulp/assets.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2018 EPAM Systems
* Copyright 2020 EPAM Systems
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions gulp/check.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2018 EPAM Systems
* Copyright 2020 EPAM Systems
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -31,4 +31,4 @@ module.exports.checkDepsExact = function (options, cb) {
} else {
cb();
}
};
};
2 changes: 1 addition & 1 deletion gulp/clean.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2018 EPAM Systems
* Copyright 2020 EPAM Systems
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion gulp/dev-script.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2018 EPAM Systems
* Copyright 2020 EPAM Systems
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion gulp/prod-script.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2018 EPAM Systems
* Copyright 2020 EPAM Systems
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion gulp/style-html.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2018 EPAM Systems
* Copyright 2020 EPAM Systems
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion gulp/tests.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2018 EPAM Systems
* Copyright 2020 EPAM Systems
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion gulp/utils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2018 EPAM Systems
* Copyright 2020 EPAM Systems
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2018 EPAM Systems
* Copyright 2020 EPAM Systems
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit ff09fbd

Please sign in to comment.