Skip to content

Commit

Permalink
Merge pull request #1361 from akohlmey/collected-small-changes
Browse files Browse the repository at this point in the history
Collected small changes for the next patch release
  • Loading branch information
akohlmey committed Mar 8, 2019
2 parents 4e2ebf7 + e62746e commit c3acb3e
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 25 deletions.
6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _Briefly describe the new feature(s), enhancement(s), or bugfix(es) included in

**Related Issues**

__If this addresses an open GitHub Issue, mention the issue number here. Use the phrases `fixes #221` or `closes #135`, when you want those issues to be automatically closed when the pull request is merged_
_If this addresses an open GitHub issue for this project, please mention the issue number here, and describe the relation. Use the phrases `fixes #221` or `closes #135`, when you want an issue to be automatically closed when the pull request is merged_

**Author(s)**

Expand All @@ -16,15 +16,15 @@ By submitting this pull request, I agree, that my contribution will be included

**Backward Compatibility**

_Please state whether any changes in the pull request break backward compatibility for inputs, and - if yes - explain what has been changed and why_
_Please state whether any changes in the pull request will break backward compatibility for inputs, and - if yes - explain what has been changed and why_

**Implementation Notes**

_Provide any relevant details about how the changes are implemented, how correctness was verified, how other features - if any - in LAMMPS are affected_

**Post Submission Checklist**

_Please check the fields below as they are completed **after** the pull request has been submitted_
_Please check the fields below as they are completed **after** the pull request has been submitted. Delete lines that don't apply_

- [ ] The feature or features in this pull request is complete
- [ ] Licensing information is complete
Expand Down
30 changes: 12 additions & 18 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1336,26 +1336,20 @@ set(temp_git_commit "(unknown)")
set(temp_git_branch "(unknown)")
set(temp_git_describe "(unknown)")
set(temp_git_info "false")
if(GIT_FOUND)
execute_process(COMMAND ${GIT_EXECUTABLE} describe HEAD
RESULT_VARIABLE temp_in_git_checkout
if(GIT_FOUND AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.git)
set(temp_git_info "true")
execute_process(COMMAND ${GIT_EXECUTABLE} -C ${CMAKE_CURRENT_SOURCE_DIR}/../.git rev-parse HEAD
OUTPUT_VARIABLE temp_git_commit
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${GIT_EXECUTABLE} -C ${CMAKE_CURRENT_SOURCE_DIR}/../.git rev-parse --abbrev-ref HEAD
OUTPUT_VARIABLE temp_git_branch
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${GIT_EXECUTABLE} -C ${CMAKE_CURRENT_SOURCE_DIR}/../.git describe --dirty=-modified
OUTPUT_VARIABLE temp_git_describe
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(temp_in_git_checkout EQUAL 0)
set(temp_git_info "true")
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
OUTPUT_VARIABLE temp_git_commit
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
OUTPUT_VARIABLE temp_git_branch
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${GIT_EXECUTABLE} describe --dirty=-modified
OUTPUT_VARIABLE temp_git_describe
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
endif()

set(temp "${temp}const bool LAMMPS_NS::LAMMPS::has_git_info = ${temp_git_info};\n")
Expand Down
1 change: 1 addition & 0 deletions src/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

/style_*.h
/lmpinstalledpkgs.h
/lmpgitversion.h

/*_gpu.h
/*_gpu.cpp
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ gitversion:
@echo 'Gathering git version information'
@echo '#ifndef LMP_GIT_VERSION_H' > ${TMPNAME}.lmpgitversion
@echo '#define LMP_GIT_VERSION_H' >> ${TMPNAME}.lmpgitversion
@if (type git && git describe HEAD ) >> /dev/null 2>> /dev/null ; then \
@if (type git && test -e ../.git ) >> /dev/null 2>> /dev/null ; then \
git='true'; \
commit=$$(git rev-parse HEAD); \
branch=$$(git rev-parse --abbrev-ref HEAD); \
Expand Down
5 changes: 5 additions & 0 deletions src/USER-BOCS/fix_bocs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,11 @@ int FixBocs::read_F_table( char *filename, int p_basis_type )
"of %d in read_F_table",p_basis_type);
error->all(FLERR,errmsg);
}
// cleanup
for (i = 0; i < N_columns; ++i) {
free(data[i]);
}
free(data);
return n_entries;
}

Expand Down
15 changes: 12 additions & 3 deletions src/group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,12 @@ void Group::assign(int narg, char **arg)
else if (strcmp(arg[1],"molecule") == 0) category = MOLECULE;
else if (strcmp(arg[1],"id") == 0) category = ID;

if ((category == MOLECULE) && (!atom->molecular))
error->all(FLERR,"Group command requires atom attribute molecule");

if ((category == ID) && (!atom->tag_enable))
error->all(FLERR,"Group command requires atom IDs");

// args = logical condition

if (narg > 3 &&
Expand Down Expand Up @@ -362,10 +368,13 @@ void Group::assign(int narg, char **arg)
} else if (strcmp(arg[1],"include") == 0) {

if (narg != 3) error->all(FLERR,"Illegal group command");
if (strcmp(arg[2],"molecule") != 0)
error->all(FLERR,"Illegal group command");
if (strcmp(arg[2],"molecule") == 0) {
if (!atom->molecular)
error->all(FLERR,"Group command requires atom attribute molecule");

add_molecules(igroup,bit);

add_molecules(igroup,bit);
} else error->all(FLERR,"Illegal group command");

// style = subtract

Expand Down

0 comments on commit c3acb3e

Please sign in to comment.