Skip to content
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.

[WIP] Electrostatics joshs development #355

Closed
wants to merge 353 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
353 commits
Select commit Hold shift + click to select a range
edc46ac
Moved bead pointers out of interaction classes
Feb 27, 2019
6a46b31
CopyTopologyData extended to Copy - now copies all data
Feb 27, 2019
2436979
Moved elements initialization out of for loop in dlpolyreader
Feb 27, 2019
5529ee0
Make Map class owner of BeadMaps
Feb 27, 2019
822a931
Changed ExclusionList to using vector instead of list
Feb 27, 2019
61c98b7
Checkpoint in cleaning up cgmoleculedef
Feb 28, 2019
c9ae401
Checkpoint in the process of redesigning cgmoleculedef and maps
Mar 1, 2019
509ac50
Checkpoint
Mar 2, 2019
04553cd
Checkpoint
JoshuaSBrown Mar 7, 2019
f2f29d2
CHECKPOINT
JoshuaSBrown Mar 8, 2019
6a5c2a4
setup apply methods
JoshuaSBrown Mar 8, 2019
fbcf37c
Checkpoint
JoshuaSBrown Mar 9, 2019
e11a2de
Add extra files
JoshuaSBrown Mar 9, 2019
2dbe6ff
Success Compiling
JoshuaSBrown Mar 13, 2019
6e14fdb
Changed names from Bead and Interaction Info to Stencil
JoshuaSBrown Mar 13, 2019
ec0b991
switched map.h to beadmap.h to differentiate from std lib
JoshuaSBrown Mar 13, 2019
4ac01f2
Expanded unit test for beadmap
JoshuaSBrown Mar 13, 2019
4971ffc
Shorted atom to cg mapper class name
JoshuaSBrown Mar 13, 2019
5d510d7
Completed test for BeadMap
JoshuaSBrown Mar 13, 2019
4f66435
Added test for converter
JoshuaSBrown Mar 14, 2019
ee0eb2f
Added method for returning the types of the topology object, and tested
JoshuaSBrown Mar 14, 2019
97c3678
Added more testing to converter
JoshuaSBrown Mar 14, 2019
366f688
Fixed error with csgapplication, atomistic and cg topologies were swi…
JoshuaSBrown Mar 14, 2019
b6aa52d
Updated csg_dump file
JoshuaSBrown Mar 14, 2019
aab5c9d
Updated csg_dump.out file to take into account changes
JoshuaSBrown Mar 14, 2019
a688c19
Added comments to type container
JoshuaSBrown Mar 14, 2019
9924b34
Added documentation to cgmoleculestencil
JoshuaSBrown Mar 14, 2019
27a942b
Added commting and rearranged code to cleanup beadmap
JoshuaSBrown Mar 14, 2019
2185485
Removed unused iterator and old commented out code
JoshuaSBrown Mar 15, 2019
25daefa
Switched bead_count to size_t type
JoshuaSBrown Mar 15, 2019
0979fe6
cast numatoms to size_t when comparing with BeadCount()
JoshuaSBrown Mar 15, 2019
b91f703
cast to size_t numatoms when comparing with BeadCount()
JoshuaSBrown Mar 15, 2019
cdb635a
cast num atoms to size_t when comparing with BeadCount()
JoshuaSBrown Mar 15, 2019
ec19e2b
cast to size_t when comparing with BeadCount
JoshuaSBrown Mar 15, 2019
9ff4841
cast to size_t when comparing with BeadCount
JoshuaSBrown Mar 15, 2019
9236605
Removed stray +
JoshuaSBrown Mar 15, 2019
378e5dc
Added missing return statement
JoshuaSBrown Mar 15, 2019
d4e687b
Removed old commented out code and cout statements
JoshuaSBrown Mar 15, 2019
e1d3962
pass in vector<string> by const reference for cgmoleculestencil
JoshuaSBrown Mar 15, 2019
4b52fd5
Used const reference for itemline in lammpsdumpreader
JoshuaSBrown Mar 15, 2019
3af2b2d
removed unused varaibles, and commented out code
JoshuaSBrown Mar 15, 2019
4502114
removed unused variable in pdbwriter
JoshuaSBrown Mar 15, 2019
376e781
Updated typecontainer const reference for exist methods and removed u…
JoshuaSBrown Mar 15, 2019
58a41ed
Removed commented out code
JoshuaSBrown Mar 15, 2019
63353dd
removed bead_type_name and corrected bead_type triplelist test
JoshuaSBrown Mar 15, 2019
3141f26
Initialized _traj_reader with nullptr in csgapplication
JoshuaSBrown Mar 15, 2019
007b585
Fixed header guard to match standard
JoshuaSBrown Mar 15, 2019
5d5a72e
Fixed placement of &
JoshuaSBrown Mar 15, 2019
6ca8b80
Added small corrections
JoshuaSBrown Mar 15, 2019
b5f5bda
Removed commented out code
JoshuaSBrown Mar 15, 2019
f4dfb9e
Standardized header guard
JoshuaSBrown Mar 15, 2019
56d880f
standardized header gaurd
JoshuaSBrown Mar 15, 2019
9dc1e21
deleted commented out old code
JoshuaSBrown Mar 15, 2019
fbea1fb
Standardized header gaud
JoshuaSBrown Mar 15, 2019
b017753
Removed commented out old code
JoshuaSBrown Mar 15, 2019
cfa1668
Standardized header gaurd
JoshuaSBrown Mar 15, 2019
8a4a3d0
removed commented out code
JoshuaSBrown Mar 15, 2019
db84d24
removed commented out code
JoshuaSBrown Mar 15, 2019
2cb6753
removed commend out code
JoshuaSBrown Mar 15, 2019
7001d9d
Removed commented out code
JoshuaSBrown Mar 15, 2019
205829b
removed old molecule file and corrected header gaurd
JoshuaSBrown Mar 15, 2019
874c1d5
Corrected difference in type when comparing
JoshuaSBrown Mar 15, 2019
27d1087
Switched order of initializion in csgapplication
JoshuaSBrown Mar 15, 2019
2b1e1d8
Removed unused include
JoshuaSBrown Mar 15, 2019
a6474b6
Added comments to method
JoshuaSBrown Mar 15, 2019
4d01c49
Fixed type difference
JoshuaSBrown Mar 15, 2019
9963f7c
Applied clang formatting
JoshuaSBrown Mar 15, 2019
3126962
Fixed @ location
JoshuaSBrown Mar 15, 2019
32d5ad8
Fixed namespace
JoshuaSBrown Mar 15, 2019
b007193
initialized more csgapplication variables
JoshuaSBrown Mar 15, 2019
5cae0c0
mad some variables const ref
JoshuaSBrown Mar 15, 2019
853f480
Fixed error with different types
JoshuaSBrown Mar 16, 2019
b1a8f92
Fixed unused variable
JoshuaSBrown Mar 16, 2019
b41d2f9
Added doc for Map methods cgmoleculestencil and unit tests
JoshuaSBrown Mar 16, 2019
1c59774
Added more tests and doc to cgmoleculestencil and added license to be…
JoshuaSBrown Mar 16, 2019
6b9163b
Added file sanity check to growriter
JoshuaSBrown Mar 16, 2019
f05c101
Removed c type assert
JoshuaSBrown Mar 16, 2019
75f7689
removed commented out code, added override keyword to child interacti…
JoshuaSBrown Mar 16, 2019
ad03b5a
Removed commented out code from csg_bolzmann main
JoshuaSBrown Mar 16, 2019
bdd5787
Removed commented out code from atomcgconverter
JoshuaSBrown Mar 16, 2019
26dd02a
CreateExclusions removed not used anywhere
JoshuaSBrown Mar 16, 2019
87f513a
Commented out code removed from interaction.cc
JoshuaSBrown Mar 16, 2019
e7ce368
Removed commented out line
JoshuaSBrown Mar 16, 2019
b7fffa6
Fixed type difference in bonded statistics, and removed commented out…
JoshuaSBrown Mar 16, 2019
926dcc1
Merge pull request #337 from votca/topology-type-container
JoshuaSBrown Mar 16, 2019
3d41845
Merge branch 'master' into joshs-development
JoshuaSBrown Mar 16, 2019
8741721
Resolved leftover conflicts in beadpair
JoshuaSBrown Mar 16, 2019
3bb9ed5
Removed leftover header files
JoshuaSBrown Mar 16, 2019
e8e6925
Corrected test case interactions
JoshuaSBrown Mar 16, 2019
a4eba25
Removed commented out code
JoshuaSBrown Mar 16, 2019
e846ed5
Merge branch 'joshs-development' of https://www.github.com/votca/csg …
JoshuaSBrown Mar 16, 2019
ee6c0a9
Ran autopep8 on problem .py files
JoshuaSBrown Mar 16, 2019
33b1408
Attempted to fix cma_processor.py codacy complaint
JoshuaSBrown Mar 16, 2019
97a5252
Fixed misaligned tabs in config_compare.py
JoshuaSBrown Mar 16, 2019
96987bd
Attempted to fix formatting again
JoshuaSBrown Mar 16, 2019
d92c680
Removed unused variable
JoshuaSBrown Mar 16, 2019
f9ec6a7
Fixed formatting
JoshuaSBrown Mar 16, 2019
69b4c10
Fixed damage done by clang formatter
JoshuaSBrown Mar 16, 2019
06cb29b
Fixed mess made by clang formatter
JoshuaSBrown Mar 16, 2019
301bdc8
Rand autopep8 on python files
JoshuaSBrown Mar 16, 2019
2af65f2
Fixed small error
JoshuaSBrown Mar 16, 2019
ad7c0ec
Fixed linearsolve.ph
JoshuaSBrown Mar 16, 2019
344f705
Fixed final small errors in .py files
JoshuaSBrown Mar 16, 2019
40e3d98
linsolve.py
JoshuaSBrown Mar 16, 2019
177739a
Merge branch 'master' into joshs-development
JoshuaSBrown Mar 17, 2019
6c536d4
Switched from using TOOLS to tools when in votca namespace
JoshuaSBrown Mar 22, 2019
33676bb
Removed bug caused from not calling correct setBox method
JoshuaSBrown Mar 22, 2019
ef657a1
Made Apply method const remove cout statements
JoshuaSBrown Mar 22, 2019
e6952e9
Added private method to atomcgconverter class
JoshuaSBrown Mar 22, 2019
b2ab3b2
Merge branch 'master' into joshs-development
JoshuaSBrown Mar 22, 2019
929c376
Updated header gaurd
JoshuaSBrown Mar 22, 2019
b4c2ffb
Updated file format factory header gaurd
JoshuaSBrown Mar 22, 2019
079b662
Removed cout commands and delete traj_reader commands
JoshuaSBrown Mar 22, 2019
71d20ec
Added memory testing to cmake
JoshuaSBrown Mar 22, 2019
515e26f
Updated valgrind cmake commands
JoshuaSBrown Mar 22, 2019
bb7556f
Added labels to tests
JoshuaSBrown Mar 22, 2019
0933c2c
Fixed some memory errors
JoshuaSBrown Mar 23, 2019
5e5a2c7
Fixed some memory errors related to unit tests
JoshuaSBrown Mar 23, 2019
2abd4c7
Swapped out new XMLBead and molecules for passing around the actual o…
JoshuaSBrown Mar 23, 2019
bc79793
Removed obsolete pdbwriter code
JoshuaSBrown Mar 23, 2019
3f795c5
Fix memory leak in lammpsdatreader
JoshuaSBrown Mar 23, 2019
c238c8b
Fixed memory errors in fmatch
JoshuaSBrown Mar 23, 2019
f32d157
Fixed memory leaks in nblist_3body
JoshuaSBrown Mar 23, 2019
d834ddb
Fixed bug introduced in csg_stat_imc
JoshuaSBrown Mar 24, 2019
41b50d4
Finished correcting all memory errors
JoshuaSBrown Mar 24, 2019
2204a83
First attempt to consolidate merge
JoshuaSBrown Mar 25, 2019
b0f8abd
Checkpoint making fixes to memory
JoshuaSBrown Mar 26, 2019
3f94845
Small fix
JoshuaSBrown Mar 28, 2019
d65b91c
Removed cout command
JoshuaSBrown Mar 30, 2019
dcf0f1e
Fixed commented out code
JoshuaSBrown Mar 30, 2019
439cc82
Merge branch 'master' into electrostatics-joshs-development
JoshuaSBrown Apr 1, 2019
7968d31
Merge pull request #365 from votca/master
JoshuaSBrown Apr 7, 2019
dc46f46
Small fix typo in CMakeLists.txt in tools
JoshuaSBrown Apr 7, 2019
989cf52
Made template readers and writers more generic
JoshuaSBrown Apr 8, 2019
67c2462
Checkpoint File Refactor
JoshuaSBrown Apr 10, 2019
5baac0e
Checkpoint
JoshuaSBrown Apr 11, 2019
026fe4a
added gmxtrajectory reader
JoshuaSBrown Apr 11, 2019
95e5fc1
Checkpoint
JoshuaSBrown Apr 11, 2019
c336837
Update files io
JoshuaSBrown Apr 11, 2019
b84d042
Success compile
JoshuaSBrown Apr 13, 2019
30b0d1a
Small fixes
JoshuaSBrown Apr 13, 2019
3515894
Success compiling with boost any pointer
JoshuaSBrown Apr 13, 2019
40319e3
Updated tests to use boost any
JoshuaSBrown Apr 13, 2019
27b83f8
Fixed csg_fmatch
JoshuaSBrown Apr 13, 2019
d293304
Fixed topologyreader invalid pointer by using virtual destructor
JoshuaSBrown Apr 13, 2019
b0cb8b9
Added fix to trajectory writers
JoshuaSBrown Apr 13, 2019
c2c158f
Success compiling and testing
JoshuaSBrown Apr 13, 2019
c487ddb
Adjust cmake to install in io folder
JoshuaSBrown Apr 13, 2019
d60d1f2
Cleanup remove commented out code
JoshuaSBrown Apr 14, 2019
d35f663
Fixed h5md and merged
JoshuaSBrown Apr 14, 2019
5255afe
Fixed merge conflict with electrostatics
JoshuaSBrown Apr 14, 2019
392bea7
Made pure virtual boundarycondition
JoshuaSBrown Apr 15, 2019
db06154
Made pure virtual in boundarycondition
JoshuaSBrown Apr 15, 2019
a31b386
Removed unneeded constructor and destructor
JoshuaSBrown Apr 15, 2019
d841ba2
Merge branch 'electrostatics' into electrostatics-joshs-development
JoshuaSBrown May 1, 2019
0806e60
Added depricated tag, removed unused includes
JoshuaSBrown May 1, 2019
1ce9ff0
Switched Apply method name to UpdateCGBead and UpdateCGMolecule
JoshuaSBrown May 1, 2019
2196a0f
update method names and made more parameters const references
JoshuaSBrown May 1, 2019
d69e5b3
Added comments describing bead mapping methods
JoshuaSBrown May 1, 2019
982ed35
Corrected gang of 3 to gang of 5, explained boost-bimap
JoshuaSBrown May 2, 2019
cb565c7
added pragma once, removed incude vec.h, added const correctness and …
JoshuaSBrown May 2, 2019
cdec34c
Added const correctness, removed unneeded constructors
JoshuaSBrown May 2, 2019
6415080
Corrected grammar and removed used method
JoshuaSBrown May 2, 2019
f9e8ec4
Reduced number of template arguments in several of the readers and wr…
JoshuaSBrown May 2, 2019
8a63dc3
Fixed the rest of the readers and writers simplifying the templates
JoshuaSBrown May 2, 2019
0481edb
Added pragma once, removed matrix.h and vec.h and added constructor f…
JoshuaSBrown May 3, 2019
640bf53
Added pragma once to all headers
JoshuaSBrown May 3, 2019
98f885a
Made file io more portable
JoshuaSBrown May 3, 2019
fe31038
Added pragma once to io files
JoshuaSBrown May 3, 2019
3fd3f7b
Fixed casting error in boost any
JoshuaSBrown May 4, 2019
c406cd7
Added comments
JoshuaSBrown May 4, 2019
1725ff2
Removed explicit constructor
JoshuaSBrown May 4, 2019
73428bd
Merge branch 'master' into electrostatics-joshs-development
JoshuaSBrown May 4, 2019
e399f80
Added getParameters method to bead
JoshuaSBrown May 7, 2019
fd45f09
Checkpoint
JoshuaSBrown May 9, 2019
f73e506
Changed vector to boost stable_vaector to avoid pointer clobbering
JoshuaSBrown May 10, 2019
e34cfcc
Merge branch 'master' into electrostatics-joshs-development
JoshuaSBrown May 10, 2019
bdff3fd
Made some fixes to pdb reader and writesr
JoshuaSBrown May 10, 2019
ef3db19
Merge branch 'electrostatics-joshs-development' of https://www.github…
JoshuaSBrown May 10, 2019
09225fb
Setup units for csgtopology
JoshuaSBrown May 10, 2019
8831257
Fix pdb reader and writer test
JoshuaSBrown May 10, 2019
9e05ef4
Formatted atom type method
JoshuaSBrown May 10, 2019
cffe51a
Added xyz reader test
JoshuaSBrown May 10, 2019
7b24d79
Fix header
JoshuaSBrown May 11, 2019
a07ec79
Fixed unit tests
JoshuaSBrown May 11, 2019
8ea993b
Checkpoint
JoshuaSBrown May 11, 2019
81a0a42
Added more units
JoshuaSBrown May 11, 2019
f2a3e16
Adding checkpoint after adding unit more unit conversion info to file…
JoshuaSBrown May 12, 2019
aa258be
Fixed units issues
JoshuaSBrown May 13, 2019
915a080
Upgraded units
JoshuaSBrown May 13, 2019
9fbd0f6
Merge branch 'electrostatics' into electrostatics-joshs-development
JoshuaSBrown May 13, 2019
3fc201c
Add all missing private header files
JoshuaSBrown May 15, 2019
a85ac6d
To use the templates with other programs they must be visible
JoshuaSBrown May 15, 2019
a93a7c2
Fixed includes
JoshuaSBrown May 15, 2019
bb0a99c
Fixed frame.dump file to reflect lammps units real
JoshuaSBrown May 16, 2019
16d6b5f
Removed cout commands
JoshuaSBrown May 16, 2019
dda0d58
Fixed reference files after correcting units
JoshuaSBrown May 16, 2019
975ed9e
Implmented unit conversions and generic structure parameters class
JoshuaSBrown May 17, 2019
78b0e0b
Fixed units and made converter return type
JoshuaSBrown May 17, 2019
9e7bd75
Removing trivial code
JoshuaSBrown May 17, 2019
4071e74
Switched Map method name to Update name which is clearer and added co…
JoshuaSBrown May 17, 2019
4f1e3db
Fixed constructor call, switched sets to vectors
JoshuaSBrown May 17, 2019
3363e3f
Switched set to vector
JoshuaSBrown May 17, 2019
9f332a8
Switched unordered_set for vector
JoshuaSBrown May 18, 2019
9da1acf
Added back EvaluateTopology needed by csg_dump
JoshuaSBrown May 18, 2019
5c7de0d
Fixed issue with EvaluateTopology calls
JoshuaSBrown May 18, 2019
f5f5eef
Reverted name of CSG_Topology to Topology rely on namespace resolve d…
JoshuaSBrown May 20, 2019
c851620
Replaced pointers with references
JoshuaSBrown May 20, 2019
60a406b
Simplified molecule syntax from pointer to reference
JoshuaSBrown May 20, 2019
0c5e1eb
Simplied const method call, added method for generic construction of …
JoshuaSBrown May 20, 2019
2e9825f
Checkpoing commit
JoshuaSBrown Jun 4, 2019
12a28f8
Merge branch 'electrostatics' into electrostatics-joshs-development
JoshuaSBrown Jun 4, 2019
5c6bed9
Shortenend atomic and molecule to atom and mol
JoshuaSBrown Jun 4, 2019
0fdf4a1
Centralized where csg units are defined to single csg class, altered …
JoshuaSBrown Jun 4, 2019
9865362
Updated atom converter methods, and finished testing
JoshuaSBrown Jun 4, 2019
bef8190
Finished removing identity and name class
JoshuaSBrown Jun 4, 2019
320f2f6
Removed assertion check
JoshuaSBrown Jun 5, 2019
a586626
Removed assertion check
JoshuaSBrown Jun 5, 2019
571d0dc
Removed assertion checks
JoshuaSBrown Jun 5, 2019
06a4386
Passed by const reference
JoshuaSBrown Jun 5, 2019
1b2784c
Moved initialization of _traj_reader to initialization list
JoshuaSBrown Jun 5, 2019
9820162
Reduced scope of propane molecule in atom converter test
JoshuaSBrown Jun 5, 2019
31aa956
Removed unused variable, and passed by const reference setElement arg…
JoshuaSBrown Jun 5, 2019
fea850a
Reduced scope of variables in dlpoltopologyreader_priv
JoshuaSBrown Jun 5, 2019
43ffff9
Switched to assertion check instead of exceptions
JoshuaSBrown Jun 5, 2019
2130a37
Removed unneccessary warning as unit converter makes units consistent
JoshuaSBrown Jun 5, 2019
b4edd03
Removed warning unneccessary is unit converter takes care of differen…
JoshuaSBrown Jun 5, 2019
e599e7b
Removed commented out code, and debug cout statements
JoshuaSBrown Jun 5, 2019
d7e5e9c
Removed cout statements in xyzwriter_priv.h
JoshuaSBrown Jun 5, 2019
5c7471a
Removed stray cout statements
JoshuaSBrown Jun 5, 2019
67bb00b
Fixed WriteBox method
JoshuaSBrown Jun 5, 2019
4709799
Small fixes to pdbwriter
JoshuaSBrown Jun 5, 2019
32dcf63
Fixed pdbwriter
JoshuaSBrown Jun 5, 2019
672cf6f
Pass by const reference in cgmoleculestencil
JoshuaSBrown Jun 6, 2019
a5fdd69
Added const and noexcept flags
JoshuaSBrown Jun 6, 2019
013f40f
Fixed errors in how trajectory reader was handling Open, and comparis…
JoshuaSBrown Jun 6, 2019
edf92f6
Fixed small error in Close function and Open pdbreader
JoshuaSBrown Jun 6, 2019
1b34a36
Fixed spelling
JoshuaSBrown Jun 12, 2019
0ca1f8a
Fixed template topology copy command, added const correctness, fixed …
JoshuaSBrown Jun 13, 2019
bde5b56
Fixed errors in csg causing tutorials to crash
JoshuaSBrown Jun 14, 2019
47604b9
Removed unused variable
JoshuaSBrown Jun 18, 2019
b8a9a55
Update comparison file to reflect improvements in the precision of co…
JoshuaSBrown Jun 18, 2019
8fed3f2
Update comparison file to reflect improvement in units
JoshuaSBrown Jun 18, 2019
9ff5f1f
Removed superfluous include
JoshuaSBrown Jun 18, 2019
fce018a
Added documentation and noexcept specified
JoshuaSBrown Jun 18, 2019
e637f3b
Removed commented out lines
JoshuaSBrown Jun 18, 2019
d08ad61
Improved testing of converter
JoshuaSBrown Jun 18, 2019
b4ecece
Applied formatting using clang-format version 8
JoshuaSBrown Jun 19, 2019
09b92a7
Fixed for loop with assertion by adding ifndef NDEBUG around for loop…
JoshuaSBrown Jun 19, 2019
55be2ee
Fixed dlpoly topology reader and use of any
JoshuaSBrown Jun 19, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ include(GNUInstallDirs)
option(ENABLE_TESTING "Build and enable testing stuff" OFF)
if(ENABLE_TESTING)
enable_testing()
include(FindPackageHandleStandardArgs)
find_program(VALGRIND_EXECUTABLE "valgrind")
find_package_handle_standard_args(VALGRIND REQUIRED_VARS VALGRIND_EXECUTABLE)
endif(ENABLE_TESTING)

########################################################################
Expand Down
4 changes: 3 additions & 1 deletion include/votca/csg/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
file(GLOB_RECURSE VOTCA_HEADERS *.h potentialfunctions/*.h)
file(GLOB VOTCA_HEADERS *.h potentialfunctions/*.h)
file(GLOB IO_HEADERS io/*.h)
install(FILES ${VOTCA_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/votca/csg)
install(FILES ${IO_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/votca/csg/io)
217 changes: 217 additions & 0 deletions include/votca/csg/atomcgconverter.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
/*
* Copyright 2009-2019 The VOTCA Development Team (http://www.votca.org)
*
* 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.
*
*/

#pragma once
#ifndef VOTCA_CSG_ATOMTOCGCONVERTER_H
#define VOTCA_CSG_ATOMTOCGCONVERTER_H

#include <map>
#include <string>
#include <vector>

#include "beadmap.h"
#include "cgmoleculestencil.h"
#include "exclusionlist.h"
#include "molecule.h"
#include <boost/bimap.hpp>
#include <votca/tools/property.h>
#include <votca/tools/types.h>

namespace votca {
namespace csg {

/**
* @brief Converter class provides methods for converting a atomistic molecule
* to a coarse grained molecule
*
* Note the converter should not have ownership of any of the topology objects
* because it should be able to convert between any topology object as long as
* it has the stencil, this means that for each operation that it performs
* an atomistic (input) object and a coarse grained (output) object must be
* provided.
*/
class AtomCGConverter {
public:
/// Constructor
AtomCGConverter(std::vector<std::string> ignore_atom_mol_types);

/// Define parameterless constructor
AtomCGConverter(){};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?


/**
* @brief Loads the .xml file describing the cg molecule
*
* Will load the information from the cg.xml file and create a stencil from
* the input. For each cg molecule defined.
*
* @param[in] filename should be an .xml file
*/
void LoadMoleculeStencil(const std::string &filename);

/**
* @brief Provided the atomic type of the molecule returns the cg type of the
* molecule
*
* @param[in] atomistic_mol_type
*
* @return cg molecule type as a string
*/
const std::string &getCGMoleculeType(const std::string &atom_mol_type) const;

/**
* @brief Provided the cg type of the molecule returns the atomic type of the
* molecule
*
* @param cg_mol_type
*
* @return atomistic molecule type as a string
*/
const std::string &getAtomisticMoleculeType(
const std::string &cg_mol_type) const;

/**
* @brief Converts a atomic topology to a coarsegrained topology
*
* @param atomic_top_in
* @param cg_top_out
*/
Topology Convert(const Topology &atom_top_in);

/**
* @brief Updates the cg topology object using the atomistic topology
*
* The properties updated include the time step, bead positions, forces and
* velocities etc...
*
* New molecules and beads are not created with this method, if the atomistic
* topology and the cg topology are inconsistent an error should occur. As an
* example if the atomistic topology contains a molecule that does not have
* a corresponding sister/brother molecule in the coarse grained description
* an error should be thrown.
*
* @param atomic_top_in
* @param cg_top_out
*/
void Update(const Topology &atom_top_in, Topology &cg_top_out) const;

/**
* @brief Returns the atomisitc beads that make up a given coarse grained
* bead in a particular molecule
*
* @param cg_mol_type
* @param cg_bead_type
*
* @return vector of the atomistic bead names in the coarse grained bead
* specified
*/
std::vector<std::string> getAtomicBeadNamesOfCGBead(
const std::string &cg_mol_type, const std::string &cg_bead_type) const;

/**
* @brief Determines if an atomisitic molecule of the provided type exists
*
* @param atom_mol_type
*
* @return true or false
*/
bool AtomisticMoleculeTypeExist(const std::string &atom_mol_type) const
noexcept;

private:
std::map<int, std::map<int, std::vector<std::pair<std::string, int>>>>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not a nice object, maybe use a structure or a class?

cgmolid_cgbeadid_atombeadnames_and_ids_;

std::unordered_set<std::string> atom_mol_types_to_ignore_;
/**
* @brief Atomic and cg bimap stores the relationship between the two types
* of molecules
*/
boost::bimap<std::string, std::string> atom_and_cg_mol_types_;

/**
* @brief Stores the stencil of the cg molecule
*
* string is the cg_mol_type
*/
std::unordered_map<std::string, CGMoleculeStencil> cg_mol_and_stencil_;

// First string atomic_molecule_type
// Second string cg_mol_type
// The molecule map
std::unordered_map<std::string,
std::unordered_map<std::string, AtomToCGMoleculeMapper>>
mol_names_and_maps_;

/**
* @brief Maps a atomistic molecule to a cg molecule and adds it to the cg
* topology
*
* Note that the cg and atomistic descriptions should have the same molecule
* ids, this means that the molecule ids will remain consistent between the
* coarse grained and atomistic descriptions.
*
* @param[in] atomistic_mol
* @param[in,out] cg_top_out
*/
// void ConvertAtomisticMoleculeToCGAndAddToCGTopology_(
Molecule &CoarseGrainMolecule_(const Topology &atom_top, Topology &cg_top_out,
const Molecule &atom_mol);

/**
* @brief
*
* Must pass all the atomic molecules bead ids in, the bead ids must increase
* in magnitude in correlation to how the .xml files are defined
*
* @param cg_or_atomic_mol_type
* @param atomic_bead_ids
*
* @return
*/
std::unordered_map<int, std::string> MapAtomicBeadIdsToAtomicBeadNames_(
const std::string &cg_or_atom_mol_type,
const std::vector<int> &atom_bead_ids) const;

bool CheckThatBeadCountAndInteractionTypeAreConsistent_(
const std::string &interaction_type, const size_t &bead_count) const
noexcept;

std::vector<CGBeadStencil> ParseBeads_(tools::Property &options);

std::vector<CGInteractionStencil> ParseBonded_(tools::Property &options);

void ParseBeadMaps_(
tools::Property &options_in,
std::unordered_map<std::string, CGBeadStencil> &bead_maps_info);

std::map<int, std::vector<std::pair<std::string, int>>>
MapAtomicBeadsToCGBeads_(const Topology &atom_top, Topology &cg_top_out,
Molecule &cg_mol,
const CGMoleculeStencil &stencil) const;

void CreateInteractions_(Topology &cg_top_out, Molecule &cg_mol,
const CGMoleculeStencil &stencil) const;

std::map<int, std::vector<std::pair<std::string, int>>>
MapAtomicMoleculeToCGMolecule_(const Topology &atom_top,
Topology &cg_top_out, const int &mol_id);
};

} // namespace csg
} // namespace votca

#endif // VOTCA_CSG_ATOMTOCGCONVERTER_H
63 changes: 27 additions & 36 deletions include/votca/csg/basebead.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@
*
*/

#pragma once
#ifndef _VOTCA_CSG_BASEBEAD_H
#define _VOTCA_CSG_BASEBEAD_H

#include <assert.h>
#include <memory>
#include <votca/csg/moleculeitem.h>
#include <votca/csg/topologyitem.h>
#include <votca/tools/constants.h>
#include <votca/tools/eigen.h>
#include <votca/tools/identity.h>
#include <votca/tools/name.h>
namespace TOOLS = votca::tools;

namespace votca {
namespace csg {
Expand All @@ -46,49 +43,48 @@ class BaseBead {
virtual ~BaseBead() {}

/// Gets the id of the bead
int getId() const { return id_.getId(); }
int getId() const noexcept { return id_; }

/// Sets the id of the bead
void setId(int id) { id_.setId(id); }

/// Gets the name of the bead
std::string getName() const { return name_.getName(); }

/// Sets the name of the bead
void setName(std::string name) { return name_.setName(name); }
void setId(int id) noexcept { id_ = id; }

/// Sets the molecule the bead is attached too
void setMolecule(Molecule *molecule) { molecule_item_.setMolecule(molecule); }
void setMoleculeId(int molecule_id) noexcept { molecule_id_ = molecule_id; }

/// Gets the molecule pointer the bead is attached too
Molecule *getMolecule() const { return molecule_item_.getMolecule(); }

/// Gets the topology pointer the bead is attached too
Topology *getParent() const { return topology_item_.getParent(); }
int getMoleculeId() const noexcept { return molecule_id_; }

/**
* get the bead type
* \return const string
*/
virtual const std::string getType() const { return type_.getName(); }
virtual const std::string getType() const noexcept { return type_; }

/**
* set the bead type
* \param bead type object
*/
virtual void setType(std::string type) { type_.setName(type); }
virtual void setType(std::string type) noexcept { type_ = type; }

/**
* @brief Returns the element type of the bead
*
* @return either the element symbol i.e. "Si" for silcon or unassigned if it
* has not been specified.
*/
std::string getElement() const noexcept { return element_symbol_; }

/**
* get the mass of the base bead
* \return - base bead mass
*/
virtual const double &getMass() const { return mass_; }
virtual const double &getMass() const noexcept { return mass_; }

/**
* set the mass of the base bead
* \param - base bead mass
*/
virtual void setMass(const double &m) { mass_ = m; }
virtual void setMass(const double &m) noexcept { mass_ = m; }

/**
* set the position of the base bead
Expand All @@ -112,25 +108,20 @@ class BaseBead {
}

/** does this configuration store positions? */
bool HasPos() const { return bead_position_set_; }
bool HasPos() const noexcept { return bead_position_set_; }

/** set has position to true */
void HasPos(bool true_or_false) { bead_position_set_ = true_or_false; }
void HasPos(bool true_or_false) noexcept {
bead_position_set_ = true_or_false;
}

protected:
BaseBead()
: topology_item_(nullptr),
molecule_item_(nullptr),
mass_(0.0),
bead_position_set_(false){};

TopologyItem topology_item_;
MoleculeItem molecule_item_;

TOOLS::Identity<int> id_;
TOOLS::Name name_;
TOOLS::Name type_;
BaseBead() : mass_(0.0), bead_position_set_(false){};

int molecule_id_ = tools::topology_constants::unassigned_molecule_id;
int id_ = tools::topology_constants::unassigned_bead_id;
std::string type_ = tools::topology_constants::unassigned_bead_type;
std::string element_symbol_ = tools::topology_constants::unassigned_element;
double mass_;
Eigen::Vector3d bead_position_;

Expand Down
Loading