Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix in gromosPP #314

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
19 changes: 10 additions & 9 deletions pygromos/gromos/gromosPP.py
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ def ran_box(
in_cnf_path: str,
out_cnf_path: str = "",
periodic_boundary_condition: str = "r",
nmolecule: int = 1,
nmolecule: str = "1",
dens: float = 1.0,
threshold: float = None,
layer: bool = False,
Expand Down Expand Up @@ -972,21 +972,21 @@ def ran_box(
+ " @pos "
+ in_cnf_path
+ " @nsm "
+ str(nmolecule)
+ nmolecule
+ " @dens "
+ str(dens)
+ " "
+ command_suffix
+ " > "
+ out_cnf_path
+ " \n"
)
if not return_command_only:
print(command)
bash.execute(command, verbose=verbose)
return out_cnf_path
else:
return command


p = bash.execute(command, verbose=verbose)
if verbose:
print(p.stdout)
print(p.stderr)
return out_cnf_path

@_gromosClass._gromosTypeConverter
def build_box(
Expand Down Expand Up @@ -1131,6 +1131,7 @@ def red_top(self, in_top_path: str, atom_selection: str, out_top_path: str, _bin
"> " + out_top_path + " \n",
]
bash.execute(command)

return out_top_path

@_gromosClass._gromosTypeConverter
Expand Down
1 change: 1 addition & 0 deletions pygromos/utils/bash.py
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,7 @@ def execute_subprocess(
env = os.environ.copy()

p = sub.Popen(args=command, shell=True, stderr=sub.PIPE, env=env, **kwargs)
out, err = p.communicate()

# print(p, vars(p))
try:
Expand Down
Loading