Skip to content

Commit 5307156

Browse files
committed
Update function documentation
1 parent 53cee01 commit 5307156

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

ensemble_md/utils/coordinate_swap.py

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,13 @@ def get_dimensions(file):
4545

4646
def extract_missing(nameA, nameB, swap_map):
4747
"""
48-
Determine the atoms which are common, which are switched between dummy and real atoms,
49-
and which are unique between the two input molecules.
48+
Determine the atoms which are missing from the swap map and reformat into
49+
pd.DataFrame object.
5050
5151
Parameters <---- CHANGE ME
5252
----------
5353
molA_file : list
5454
A list of strings containing lines of the GRO file for molecule A.
55-
molB_file : list
56-
A list of strings containing lines of the GRO file for molecule B.
5755
nameA : str
5856
The name of the residue being altered in molecule A.
5957
nameB : str
@@ -266,11 +264,7 @@ def get_miss_coord(mol_align, mol_ref, name_align, name_ref, df_atom_swap, dir,
266264
A pandas DataFrame that contains the following information for each at omthat is no in the common list:
267265
268266
- The name of the atom
269-
- The atom number
270-
- The atom element
271-
- Whether the atom is switchin between dummy and real or missing
272267
- The swap direction (same as input)
273-
- Thether the final atom type is real or dummy
274268
dir : str
275269
The swapping direction.
276270
df_swap : pandas.DataFrame
@@ -680,24 +674,26 @@ def write_modified(df_atom_swap, swap, line_start, orig_file, new_file, atom_num
680674
Master DataFrame containing info on the atoms which will change before and after the swap.
681675
swap : str
682676
The swapping direction.
683-
r_swap : str
684-
Reverse of the swapping direction.
685677
line_start : int
686678
The line number where we start reading the file.
687679
orig_file : list
688680
List of strings containing the content of the pre-swap file to read from.
689681
new_file : file-like object
690682
Temporary file to write new coordinates.
683+
atom_num_init : int
684+
Atom number for the first atom to be written to the file.
691685
old_res_name : str
692686
Residue name from before the swap.
693687
new_res_name : str
694688
Residue name for after the swap.
695689
orig_coords : numpy.ndarray
696690
Coordinates for all atoms in the system before the swap.
697-
miss : list
698-
Residues which are needed after the swap which are not present before the swap.
691+
atom_mapping : pd.DataFrame
692+
Pandas df to map the names and number for identical atoms between the two molecules
699693
atom_order : list of str
700694
List of the atom names in the order they appear in the GRO file
695+
old_atom_order : list of str
696+
List of the atom names in the order they appear in the previous moleucle's GRO file
701697
"""
702698
# Add vero velocity to all atoms
703699
vel = ['0.000', '0.000', '0.000\n']
@@ -886,7 +882,7 @@ def get_names(input, resname):
886882
The next line to start reading from the topology.
887883
atom_name : list
888884
All atom names in the topology corresponding to the residue of interest.
889-
atom_num : list
885+
atom_num : np.array
890886
The atom numbers corresponding to the atom names in atom_name
891887
state : list
892888
The state that the atom is a dummy atom (:math:`lambda=0`, :math:`lambda=1`, or -1 if nevver dummy).

0 commit comments

Comments
 (0)